Reputation: 1175
I'm using Jenkins, Git and Maven as part of my development process. I have two branches develop
and master
. As usual I do my development on develop, test it and merge it to master for the jar to be published.
I'm using Jenkins to deploy my snapshots/release jars to our Nexus repository. When I deploy/publish the release jar (one without -SNAPSHOT
) I would like to create a release TAG in my GitHub repo, while I want to avoid that while deploying my snapshots.
I went through the posts at http://www.dev9.com/article/2014/9/java-release-process-with-continuous-delivery and https://axelfontaine.com/blog/final-nail.html to get some idea.
My questions are the following:
maven-scm-plugin
and maven-version-plugin
to create the tag.-SNAPSHOT
from the version in pom.xml
of my master branch? I know the scm plugin will remove those while creating the tag, but I suppose Maven will publish/deploy the jar with -SNAPSHOT
? While running the Jenkins job for my master branch, I would like to deploy 1.0.0.jar
and not 1.0.0-SNAPSHOT
.Upvotes: 2
Views: 7540
Reputation: 1140
Basically you need the following plugin: http://maven.apache.org/maven-release/maven-release-plugin/
The plugin do the following:
-SNAPSHOT
, and commit-SNAPSHOT
, commitWhat it look like in jenkins (configuration of the job)
Upvotes: 4