maven archetype property substitution

前端 未结 1 435
一向
一向 2021-01-19 14:24

Anybody knows is it possible to make substitution for default value of one requredProperty to another in archetype-metadata.xml ?

So, I try to do someth

相关标签:
1条回答
  • 2021-01-19 15:22

    Your problem is caused by required property loading order. Maven loads every custom required property in alphabetical order. You probably cant change it. But there are 2 ways which will solve your problem:

    1. Renaming ur variables like this:

      "0_name"

      "1_groupId"

      Now it will ask you about name firstly.

    2. Use full maven command, passing only name parameter

      mvn archetype:generate -DarchetypeGroupId=?? -DarchetypeArtifactId=?? -DgroupId=?? -DartifactId=?? -Dversion=?? -Dpackage=?? -Dname=??

      Replace ?? with valid parameters

    Hope it will helps you.

    EDIT: now i see an asked time. Pretty offtopic but maybe it will help someone else

    0 讨论(0)
提交回复
热议问题