开发者

How can I use SCM changelist number as my artifact version in maven 3?

开发者 https://www.devze.com 2023-03-03 00:32 出处:网络
In maven 2 I used a property for the artifact version and specified that on the command line using -D

In maven 2 I used a property for the artifact version and specified that on the command line using -D

i.e.

<artifactId>myArtifact</artifactId>
<version>${artifact.version}</version>

mvn clean install -Dartifact.version=SCM_Version

Maven 3 gives a warning on this:

'version' contains an expression but should be a constant.

What is the proper way to do something like this in maven 3?开发者_运维技巧


Not a useful answer, but this is an open issue in maven 3.

0

精彩评论

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

关注公众号