blog image

Cutting Releases for your AEM Projects using maven

Blog - All, DevOps, Technology

  • icons22 April, 2020
  • iconsUday Patel

In this blog, we will go over the configuration needed to Release cut an AEM project using Maven and also how to increment major and minor version in the process.

The release cutting can be done using the maven-release plugin. This plugin provides a standard mechanism to release project artifacts outside the development team. The maven-release plugin provides basic functionality to create a release and to update the project’s SCM accordingly.

Following command will prepare the release for the AEM project using maven-release plugin.

mvn release:clean release:prepare -DautoVersionSubmodules=true

The default behavior of the maven-release plugin is to increment the minor versions of the archetype. At some point of project, the major version needs to be updated and this can be achieved by using the build-helper:parse-version.

mvn build-helper:parse-version 

The above example parses a version string and set properties containing the component parts of the version. This library sets the following properties

[propertyPrefix].majorVersion
[propertyPrefix].minorVersion
[propertyPrefix].incrementalVersion
[propertyPrefix].qualifier
[propertyPrefix].buildNumber

Where the propertyPrefix is the string set in the mojo parameter. The parsing of the above is based on the following format of the version:

<majorversion [> . <minorversion [> . <incrementalversion ] ] [> - <buildnumber | qualifier ]>

The advantage of this plugin is the goal also sets the next version as properties.

[propertyPrefix].nextMajorVersion
[propertyPrefix].nextMinorVersion
[propertyPrefix].nextIncrementalVersion
[propertyPrefix].nextBuildNumber

Using the above properties from the build-helper:parse-version, we can set the next version of the archetype during the release cut without any issues.

Example:

mvn build-helper:parse-version release:clean release:prepare -DdevelopmentVersion=${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}.0-SNAPSHOT

The above example prepares the release and sets the development version to the set properties using the build-helper plugin.


We at Initialyze are dedicated to improving your AEM Platform experience and usability. We have implemented CI / CD pipelines, release cutting, release promotion automations via Jenkins for several large multi-module projects for some of the largest fortune 500 companies. Get in touch with us to know more about our services and AEM expertise.


Leave A Comment

Your email address will not be published. Required fields are marked *