How to set jenkins build number in artifact name
Currently my artifact looks like this: project-1.1.jar
I want to add Jenkins build number to look like project-1.1.45.jar where 45 is build number.
+4
Horatiu jeflea
source
to share
1 answer
This should do the trick:
<project //
<name>project</name>
<version>1.1</version>
<build>
<finalName>${project.name}##${project.version}.${BUILD_NUMBER}</finalName>
</build>
</project
buildNumber will be set to Jenkins build number
Edit: I don't have access to Jenkins config, it works for me with $ {buildNumber} instead of $ {BUILD_NUMBER}.
+4
John
source
to share