Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Automatic increment in build release verison


Level 1


I want to auto increment project build release version with each jenkins deployment. My jenkin has following goal seetings[1]. I created project by using command[2] and following URL[3]. Please provide guidance, how could I set auto incremental build release version for my project? 

As of now, My project is building successfully but with version containing "SNAPSHOT" keyword.

[1] clean install -Dcq.password=password dev-author

[2] Command: 

$ mvn archetype:generate \
    -DarchetypeRepository= \ \
    -DarchetypeArtifactId=multimodule-content-package-archetype \
    -DarchetypeVersion=1.0.2 \
    -DgroupId=my-group-id \
    -DartifactId=myproject \
    -Dversion=1.0-SNAPSHOT \
    -Dpackage=com.mycompany.myproject \
    -DappsFolderName=myproject \
    -DartifactName="My Project" \
    -DcqVersion="5.6.1" \
    -DpackageGroup="My Company"


Thanks in advance

4 Replies


Level 1

I have tried this but through Jenkins it is not working. So anyone tried to update Build release number by using Jenkins? 




Please have a look at this post:- 


//Incremental build in Jenkins

  • Using parallel builds. In my experience in large projects this works great and can greatly reduce the build time with minimum (if any) risk. Just execute something like mvn -T 1.5C clean install

  • If your modules are independent you can rather move them to different projects and glue them together by using maven dependencies.

I hope this would help you.

Thanks and Regards

Kautuk Sahni