[ https://issues.apache.org/jira/browse/ARCHETYPE-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott MacDonald updated ARCHETYPE-552: -------------------------------------- Description: When developing a multi module archetype with a root level aggregator pom which inherits from a sibling parent within the project, the archetype generated project will incorrectly add the aggregator pom as a parent to the sibling parent pom file, causing an inheritance cycle in the generated project. Attached is a zip file containing a minimal archetype project that demonstrates the behavior. After running mvn install, you can inspect target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml and see that the generated project incorrectly adds the top-level aggregate pom as a parent in the parent pom causing an inheritance cycle, even though such a parent designation is specified in the archetype resources. The exact element that is incorrectly added to target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml is below.. <parent> <artifactId>example-project-aggregator</artifactId> <groupId>com.foo</groupId> <version>0.0.0</version> </parent> After the failure, removing the incorrect parent pom element from the target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml results in a working maven project. was: When developing a multi module archetype with a root level aggregator pom which inherits from a sibling parent within the project, the archetype generated project will incorrectly add the aggregator pom as a parent to the sibling parent pom file, causing an inheritance cycle in the generated project. Attached is a zip file containing a minimal archetype project that demonstrates the behavior. After running mvn install, you can inspect target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml and see that the generated project incorrectly adds the top-level aggregate pom as a parent in the to the parent pom causing an inheritance cycle, ven tough such a parent designation is not specified in the archetype resources) The exact element that is incorrectly added to target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml is below.. <parent> <artifactId>example-project-aggregator</artifactId> <groupId>com.foo</groupId> <version>0.0.0</version> </parent> After the failure, removing the incorrect parent pom element from the target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml results in a working maven project. > Valid Archetype projects can generate broken projects with inheritance cycle > > ------------------------------------------------------------------------------- > > Key: ARCHETYPE-552 > URL: https://issues.apache.org/jira/browse/ARCHETYPE-552 > Project: Maven Archetype > Issue Type: Bug > Components: Plugin > Affects Versions: 3.0.1 > Reporter: Scott MacDonald > Priority: Major > Attachments: maven-archetype-parent-cycle-bug.zip > > > When developing a multi module archetype with a root level aggregator pom > which inherits from a sibling parent within the project, the archetype > generated project will incorrectly add the aggregator pom as a parent to the > sibling parent pom file, causing an inheritance cycle in the generated > project. > Attached is a zip file containing a minimal archetype project that > demonstrates the behavior. > After running mvn install, you can inspect > target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml > and see that the generated project incorrectly adds the top-level aggregate > pom as a parent in the parent pom causing an inheritance cycle, even though > such a parent designation is specified in the archetype resources. > > The exact element that is incorrectly added to > target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml > is below.. > <parent> > <artifactId>example-project-aggregator</artifactId> > <groupId>com.foo</groupId> > <version>0.0.0</version> > </parent> > > After the failure, removing the incorrect parent pom element from the > target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml > results in a working maven project. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)