Can I use the maven-release plugin with a specific version?

I am thinking of a deployment pipeline using SVN, Jenkins, and Maven. At the moment, I am stuck at the point where I usually called mvn release:perform on a working copy.

When you are thinking of deploying pipelines, I want to create a pipeline where each clamp can be used to release testing / production software. Let's say I have 5 collections, and I decide to release assembly 3 (with revision 3) for production. There will already be 2 new fixations in the trunk (which are now in version 5).

Is it possible to use maven-release-plugin for checkout / build / tag / commit release in version 3? . When the maven-release plugin finishes release, it usually commits the modified POM trunk.

I am happy for any information or advice here, so feel free to give me books (e.g. http://www.amazon.com/Continuous-Delivery- Deployment-Automation-Addison-Wesley / dp / 0321601912 ), blog posts, Jenkins documentation ... Perhaps I am completely mistaken.

+6
source share
2 answers

By default, the release plugin creates a release based on the contents of your working copy, it simply ensures that you do not have uncommitted content before doing this. AFAIK it does not force to update sources, as usual it is a continuous integration system (Jenkins in your case). So everything that is checked by Jenkins will be released.

What you are trying to do is more like a configuration change on the Jenkins side, indicating the correct revision.

On the other hand, if the POM files are modified as part of the release, but have been changed in SVN, in the meantime you will encounter a conflict when Maven wants to check the modified POM files. This is a situation that may occur depending on how you want to return with the release.

Based on this, it may make more sense to always create a branch before release. Thus, you must create a branch based on version 3, and then create your version in this branch. This way, you will not encounter issues with commit resources that have been changed in later versions.

Creating a branch and checking it would probably be automated through Jenkins and Maven.

+2
source

As far as I tested, this is not possible.

More specifically, as nwinler said, when you release, maven will try to commit the modified pom. But if it is an older version than the current one, SVN will complain that your sources are not updated. So this will not work. ... as far as I know.

You can read the promotion documents. I do not find one clear enough to be indicated (in a few minutes of writing this message).

+1
source

All Articles