I am trying to create arhetype from my own maven project. I have some properties at pom.xml as;

<properties>
    <path.property>${path}</path.property>
</properties>

This property is used at my project from command line. I wanna create archetype and use this property at when generation of new project from this archetype. So new project's pom.xml property value of path.property will be variable which is entered.

For example when i entered -Dpath=/src/main/java while new project generation with my archetype, i want to have like this pom.xml ;

<properties>
    <path.property>${path}</path.property>
</properties>

Thanks for helping..

有帮助吗?

解决方案

You need to define your custom property path in the archetype-metadata.xml. If you define the property as required, then the property will be prompted when you use the archetype from command line.

http://maven.apache.org/archetype/archetype-common/archetype-descriptor.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top