You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Scott MacDonald (JIRA)" <ji...@apache.org> on 2018/07/25 18:51:00 UTC
[jira] [Created] (ARCHETYPE-552) Valid Archetype projects can
generate broken projects with inheritanc cycle
Scott MacDonald created ARCHETYPE-552:
-----------------------------------------
Summary: Valid Archetype projects can generate broken projects with inheritanc cycle
Key: ARCHETYPE-552
URL: https://issues.apache.org/jira/browse/ARCHETYPE-552
Project: Maven Archetype
Issue Type: Bug
Affects Versions: 3.0.1
Reporter: Scott MacDonald
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 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)