-
Notifications
You must be signed in to change notification settings - Fork 1
ReleaseManagement
One of the common mantras of open-source software development is "Release early, release often." Towards that goal, this guide will walk you through the process of performing a release of OpenTripPlanner. What happens when you perform a release?
-
Maven module versions are changed from SNAPSHOT to release version numbers.
-
The release version is tagged in the source tree
-
Release artifacts (jars, wars, etc) are built for the release and deployed to the Maven repository
-
Maven module versions are changed once more at the end to include the new, incremented SNAPSHOT version number for the next round of development
The actual act of performing a release is handled by Maven, which automates much of the tedious work of tagging revisions, updating version numbers, building release artifacts, and deploying the results. Actually performing a release is a two step process of running the following commands:
mvn release:prepare
mvn release:perform
The first step prepares the source tree for release, asking you what version you want to tag the release with along with the next dev version. Typically the defaults are fine, but see the discussion of versioning above. The next preparation step involves running the full project test suite. If tests are failing, you won't be able to perform a release. Assuming all the tests pass, Maven will physically update the project pom.xml files with new version info, tagging the release in the source repository.
The second step checks out a clean copy of the tagged release from the source repository, builds everything, and deploys it to Maven repository (currently, the OpenGeo repository at http://repo.opengeo.org). Once deployed, the release is done! The deployment requires transferring quite a few large files, so I prefer to do it on a server in the same data center as our Maven repository (usually ci.opentripplanner.org). If I do the release from my own machine, I avoid doing it over a wireless network since I've had deployments stall or fail this way.
-
Make sure your source tree has no uncommitted changes (
svn status
) and is up-to-date (svn up
) before performing a relase -
All tests have to pass to perform a release. Run
mvn verify
to run the full suite of tests. -
You cannot perform a release if you have any external SNAPSHOT dependencies currently active in the project.