質問

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