Archetype gurus...
So I want to prompt for the following in my own in-house archetype:
parentGroupId
parentArtifactId
parentVersion
scmUrl
Based on performing rigorous RTFM and blog reading I came upon the method to do
so.
$ tail src/main/resources/META\-INF/maven/archetype\-metadata.xml
</includes>
</fileSet>
</fileSets>
<requiredProperties>
<requiredProperty key="scmUrl"/>
<requiredProperty key="parentGroupId"/>
<requiredProperty key="parentArtifactId"/>
<requiredProperty key="parentVersion"/>
</requiredProperties>
</archetype-descriptor>
Right.
So it seems to be confused about when it happens to be required. I need it to
be required when I execute the archetype:create -- not when I am performing a
"mvn install" on the archetype project...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO]
Archetype IT 'basic' failed: Missing required properties in
archetype.properties: scmUrl, parentGroupId, parentArtifactId, parentVersion
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
Without these required properties defined in the descriptor, it packages and
installs real nicely... And the resulting archtype works as expected (minus
these extra prompts).
What could I possibly be overlooking or doing wrong?
Thanks,
Roy