Release Management

Table of Contents

41.1. Introduction
41.2. Let's release!
41.2.1. Remove all dependencies on SNAPSHOT versions
41.2.2. Checkout the code and clean your repository
41.2.3. Test the release
41.2.4. Perform the release
41.2.5. You're done

41.1. Introduction

Nuxeo EP and related components can use the maven release plugin to prepare and perform releases of Nuxeo components.

The release of a project usually consists in those operations:

  • perform a clean checkout and launch the tests

  • change version numbers

  • tag sources in the source control system (ex: SVN)

  • update version number of the trunk to start the new development cycle

  • publish software and related information

The maven release plugin streamlines and automates the release process of software components.

To get more background about maven release, you can read following pages:

41.2. Let's release!

When your software is ready to be released, you want to launch the release process. :-)

This process has to be as easy as possible. You will be able to find bellow the basic process.

41.2.1. Remove all dependencies on SNAPSHOT versions

To enforce that the build is reproducible, maven refuses to create a new release if there are dependencies on SNAPSHOT versions.

The first step is then to remove all dependencies on SNAPSHOT versions. Of course, as you may not be able to release all your dependencies as long as your software, you can create specific versions of your dependencies for the release.

Here is the fastest way:

            $ mvn deploy:deploy-file -DrepositoryId=central \ 1
            -Durl=dav:http://tamise.nuxeo.com:8080/archiva/repository/central \ 2
            -DgroupId=org.apache.myfaces.trinidad \ 3
            -DartifactId=trinidad-impl \ 4
            -Dversion=1.0.1-incubating-NXEP51M2 \ 5
            -Dpackaging=jar \ 6
            -Dfile=trinidad-impl-1.0.1-incubating-NXEP51M2.jar 7 
          
1 2

Informations of the repository you are using. For Nuxeo's software, use:

  • repositoryId: central

  • url: http://tamise.nuxeo.com:8080/archiva/repository/central>

Of course, you will need write permission on the repository. You can request it from your repository's manager.

3 4 5 6
  • groupId: the group id for the artifact, you should get it for the pom of this artifact

  • artifactId: idem

  • packaging: usually jar (or pom if you are only deploying a pom file)

7

Point to the file (usually jar or pom) you want to upload.

41.2.2. Checkout the code and clean your repository

First, you need to get a fresh copy of the components you are about to release.

$ mvn scm:checkout svn:http://server/yoursoftware/trunk

To be sure that everything is clean and that you will test in the same environment as new users, remove your repository. On windows, remove your repository using your preferred tool. On Linux/Unix/MacOS, you can perform:

$ rm ~/.m2/repository

to remove your entire maven repository.

41.2.3. Test the release

Let's try to build and test the software before launching a dry run of the release process.

mvn install

This should download all required dependencies (since you've clean your maven repository in the previous paragraph) and build the software.

We now can test the release preparation process.

mvn release:prepare -DdryRun=true

Answer, now to the questions maven will ask about version numbers and tag name. This will simulate a release preparation, especially the svn tags.

If everything went well until that point, we can actually perform the release...

41.2.4. Perform the release

For each component you want to release, do:

mvn release:prepare release:perform

This will tag your sources in the SCM, build the software, build the site upload your artifact to the defined repository and deploy your site.

In Nuxeo's case, you need to release first the global master POM before releasing other component, if the master POM is using a SNAPSHOT version. To achieve this, go to a checkout of the master POM and do a non-recursive release using:

mvn -N release:prepare release:perform

Then you can set master POM's new version number into each component you want to release and start the release process.

41.2.5. You're done

Now you're done. You have released your software using maven release and you can happily use your new component in your projects or deliver your customer! :-)