Set plugin's property on the command line in maven 2

后端 未结 4 1295
伪装坚强ぢ
伪装坚强ぢ 2021-02-06 23:28

In maven 2.x, how would one set a plugin\'s property on the command line instead of in the of that plugin in the pom or in settings.xml?

For exampl

4条回答
  •  春和景丽
    2021-02-06 23:52

    Answer was right in front of me in the copy-dependencies mojo docs (I even linked to it). The documentation for the property includes the Expression you can refer to it by.

    useRepositoryLayout: Place each artifact in the same directory layout as a default repository. example: /outputDirectory/junit/junit/3.8.1/junit-3.8.1.jar

    * Type: boolean
    * Since: 2.0-alpha-2
    * Required: No
    * Expression: ${mdep.useRepositoryLayout}
    * Default: false
    

    To set this property from command line you need to run

    mvn -Dmdep.useRepositoryLayout=true 
    

提交回复
热议问题