So, for a new Jenkins job (Build a maven2/3 project) – we”ll define 2 String parameters: releaseVersion=0.1 and developmentVersion=0.2-SNAPSHOT.Īt the Build configuration section, we can simply configure the following Maven command to run: release:clean release:prepare release:perform However, since the Maven command for performing the release is simple enough, we can simply define a standard Jenkins job to perform the operation – no plugins necessary. The existing Jenkins plugins focused on the release process are: Jenkins can perform the release process in one of two ways – it can either use it's own release plugins, or it can simply run perform the release with a standard maven job running the correct release steps. The plugin is configured to perform the Release process without the staging mechanism, same as previously, for the Deployment process ( skipStaging=true).Īnd also similar to the Deployment process, Releasing to Nexus is a secured operation – so we're going to use the Out of the Box deployment user form Nexus again. It is in this process that the nexus-staging-maven-plugin is used to perform a deploy to the nexus-releases Nexus repository: Also setting autoVersionSubmodules configuration to true ensures that each module version is same as the parent version, if it is set to false, the user will be prompted for the version number for each module of the project. What is important here is that the releaseProfiles configuration will actually force a Maven profile – the releases profile – to become active during the Release process. The standard Maven plugin used by a Release Process is the maven-release-plugin – the configuration for this plugin is minimal:
0 Comments
Leave a Reply. |