How can I update a property in a Maven POM?

后端 未结 7 679
耶瑟儿~
耶瑟儿~ 2020-12-13 18:23

I have two top-level Maven projects, backend and frontend, that advance versions at their own individual pace. Since each has multiple modules, I d

7条回答
  •  甜味超标
    2020-12-13 19:04

    Is there a simple way to rewrite a Maven property entry to a specific value

    Since version 2.5 we can use set-property (documentation):

    mvn versions:set-property -Dproperty=your.property -DnewVersion=arbitrary_value

    As documented, the set-property goal does not perform any 'sanity checks' on the value you specify, so it should always work, but you should use with care.

提交回复
热议问题