开发者

maven dependencies in profiles during release build

开发者 https://www.devze.com 2022-12-19 10:03 出处:网络
I have a maven module which has several dependencies that are contained in profiles. When preparing a release build using the release plugin (i.e. mvn release:prepare), the versions of those dependenc

I have a maven module which has several dependencies that are contained in profiles. When preparing a release build using the release plugin (i.e. mvn release:prepare), the versions of those dependencies do not get replaced, instead they remain the SNAPSHOT dependencies, even though the profiles are active (we run mvn release:prepare -Psomeprofile). I have also tried adding -Darguments="-Psomeprofile" to the m开发者_开发百科vn call, but this did not help either.

How can I make the release plugin also replace the versions of dependencies that are contained in profiles?


This looks like MRELEASE-354, "Versions defined in profiles are not updated". The workaround if to use

<version>${project.version}</version> 

for the dependencies defined inside profiles.

0

精彩评论

暂无评论...
验证码 换一张
取 消