Affects Version/s: None
Fix Version/s: 2.0-alpha-5
Number of attachments :
When creating a new archetype that I want to use for my projects I ran into some trouble with the created/copied pom.xml.
The archetype pom.xml (\src\main\resources\archetype-resources\pom.xml) looks like this:
When I run my archetype it creates a pom.xml that looks like:
Where "integration" is the name of the pom in the folder that I'm running mvn archetype:create from.
Digging into the source we find in DefaultArchetype.java that processTemplate is indeed reading the parent pom and overwriting whatever was found in the original pom.xml.
Is this really what we want to achieve? It should be possible to keep the parent-pom from the pom.xml in the archetype since it reduces the need for all developers to change their newly created pom.xml.
Two alternative solutions:
- If the parent-pom is specified in the archetype-pom, don't replace it
- A parameter that we can supply that will leave the archetype-pom parent setting untouched.
I vote for solution number 1....