简体   繁体   中英

Jar versioning in Jenkins

On each maven build or release, how to get new jar version in Jenkins. I have tried it in Jenkins but only getting same jar file name as it is in pom file.

您可以使用maven-exec-plugin将版本打印到stdout或将其写入文件中:

mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:exec

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM