Hello, I created an archetype to create a new project (a project root pom), and another one to create a module of some kind. I want them separated - I don't want a multi-module archetype. My use-case is when I create a new module from archetype, in a folder already containing my project root pom.
If I specify a <parent> section in the template pom.xml (in archetype-resources) of the module archetype, when I create it from archetype, this parent section is copied as is in generated module pom.xml (this parent is my corporate master pom). If I do not specify a <parent> section in the template pom.xml of the module archetype, then automatically the project root pom is added as parent in generated module pom.xml. I would like to find a solution, to make it "smart", ie: - I specify a <parent> (my corporate master pom) in my module archetype source pom.xml - Upon module creation from archetype - if there is a project parent, then it is replaced in module pom.xml - if there is no project parent (so this is an independent module that is created), then the corporate pom parent is kept Objective obviously being that whatever situation I try to enforce usage of my corporate master pom, without forcing everyone to inherit it by default in all project/modules/submodules poms. I succeeded in adding some conditions in my archetype pom with Velocity, but I don't know if I have a possibility to test for a parent pom being in parent folder at archetype creation time ? Thanks, Jeremie -- View this message in context: http://maven.40175.n5.nabble.com/Conditionnal-adding-of-parent-section-in-generated-archetype-tp5779105.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org