Table of Contents
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:
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.
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 \ -Durl=scpexe://amour.nuxeo.org/home/nexus/repositories/vendor-release \ -DgroupId=org.apache.myfaces.trinidad \ -DartifactId=trinidad-impl \ -Dversion=1.0.1-incubating-NXEP51M2 \ -Dpackaging=jar \ -Dfile=trinidad-impl-1.0.1-incubating-NXEP51M2.jar
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.
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...
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.