My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HowToMakeARelease  
How to make a release of Concordion
Phase-Deploy
Updated Feb 4, 2010 by jose.m.b...@gmail.com

Introduction

Using Maven and maven-release-plugin we can automate part of the process of a release.

By executing mvn release:prepare we get:

  1. a revision in the trunk without -SNAPSHOT
  2. a tag named concordion-"version"
  3. a revision in the trunk with the new version plus -SNAPSHOT

Pre-conditions

All the changes have to be committed to SVN.

Checking the release

mvn release:prepare -DdryRun=true

During this build, Maven will ask interactively:

What is the release version for "concordion"? (org.concordion:concordion) 1.3.1: : 1.3.1-RC5
What is SCM release tag or label for "concordion"? (org.concordion:concordion) concordion-1.3.1-RC5: : 
What is the new development version for "concordion"? (org.concordion:concordion) 1.3.2-SNAPSHOT: : 1.3.1-SNAPSHOT

and then it will execute mvn clean verify

[INFO] Executing preparation goals - since this is simulation mode it is running against the original project, not the rewritten ones
[INFO] Executing goals 'clean verify'...
[INFO] Executing: mvn clean verify --no-plugin-updates

Executing the real preparation

mvn release:clean release:prepare

Maven will ask again for the versions (you can avoid asking again by not using relese:clean). This will actually commit the changes in SVN.

  1. a revision in the trunk without -SNAPSHOT
  2. a tag named concordion-"version"
  3. a revision in the trunk with the new version plus -SNAPSHOT

If something goes wrong, you can rollback using mvn release:rollback.

Upload to remote repository

mvn release:perform

This command will checkout the project from the tag and will execute the following goals: source:jar javadoc:jar deploy. Instead of the default (deploy site-deploy). See maven-release-plugin configuration in the pom.xml.

The goal deploy will use the information in the distributionManagement section (in pom.xml) in order to upload all the artifacts to the repository for releases. It is located in http://concordion.googlecode.com/svn/repos/releases and you can use it by including in your pom.xml the corresponding entry:

<repository>
  <id>concordion-releases</id>
  <url>http://concordion.googlecode.com/svn/repos/releases</url>
  <releases>
    <enabled>true</enabled>
  </releases>
</repository>

Not everyone is allowed to deploy in this repository because you have to be a developer in the Concordion project and you need to put your username and password in your settings.xml like follows:

<servers>
  <server>
    <id>concordion-releases</id>
    <username>yourusername</username>
    <password>xyxyxyyx</password>
  </server>
</servers>

Automated synchronization with Maven Central Repository

We don't need to upload manually a bundle artifact to the Download area of this site in order to request in JIRA the deployment in the Maven Central Repository as explained in Maven documentation. Now we have automated this process and it is done by synchronizing our remote repository with the Maven Central Repo.


Sign in to add a comment
Powered by Google Project Hosting