[
https://jira.codehaus.org/browse/ARCHETYPE-368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed ARCHETYPE-368.
------------------------------------
Resolution: Won't Fix
Please refer to
https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
if you're wondering why this issue was closed out.
> Enforced parent of modules gets replaced by project parent
> ----------------------------------------------------------
>
> Key: ARCHETYPE-368
> URL: https://jira.codehaus.org/browse/ARCHETYPE-368
> Project: Maven Archetype
> Issue Type: Bug
> Components: Creator
> Affects Versions: 2.0
> Environment: Maven 3.0.2
> Reporter: Georges-Etienne Legendre
>
> We want to have archetype that creates a project with modules. Child modules
> should not inherit from the project POM. This is the model presented in the
> Maven Guide: section 3.6.2.2
> http://sonatype.com/books/mvnref-book/reference/pom-relationships-sect-multi-vs-inherit.html
> Example:
> {code}
> test-project/
> pom.xml: parent is com.test.pom:my-meta-parent
> test-module1/
> pom.xml: parent should be com.test.pom:my-parent-1
> test-module2/
> pom.xml: parent should be com.test.pom:my-parent-2
> test-module3/
> pom.xml: parent should be test-project
> {code}
> In the archetype, I have:
> {code}
> project-archetype/
> src/main/resources/
> __rootArtifactId__-module1/
> pom.xml:
> <project>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>com.test.pom</groupId>
> <artifactId>my-parent-1</artifactId>
> <version>RELEASE</version>
> </parent>
> ...
> __rootArtifactId__-module2/
> pom.xml:
> <project>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>com.test.pom</groupId>
> <artifactId>my-parent-2</artifactId>
> <version>RELEASE</version>
> </parent>
> ...
> __rootArtifactId__-module3/
> pom.xml:
> <project>
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>${groupId}</groupId>
> <artifactId>${rootArtifactId}</artifactId>
> <version>${version}</version>
> </parent>
> ...
> {code}
> When the archetype is used to create a project, all <parent> of module get
> replaced by the new project Pom.xml... They all end up with:
> {code}
> <parent>
> <groupId>com.test.project</groupId>
> <artifactId>test-project</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> </parent>
> {code}
> Is there a way to fix this? Thanks!
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)