Releasing A Maven Shared Component

Releasing a Maven component is much the same as any other Maven project. The following guide walks through most of the steps:

Note that components have particular conventions for deploying the project site. When encountered in the release process above, perform the following steps:

Staging the latest documentation

Once the release is prepared, but before the release vote, the site needs to be staged.

The shared component parent POM is configured to stage the documentation in a "versioned" directory such as /shared/maven-XXX-Y.Z.

  1. Stage the documentation for the current release version (not the new snapshot).
    cd target/checkout
    mvn site site:stage-deploy -Preporting
    

    Note: It requires Maven 2.1.0 or higher to successfully deploy to people.apache.org via SSH. Older Maven versions will fail due to com.jcraft.jsch.JSchException: Algorithm negotiation fail.

    Note: You should verify the deployment of the site on the Maven website (you need to wait the sync).

    http://maven.apache.org/shared/maven-XXX-Y.Z/
    

    Some developers have reported problems with the site:stage-deploy goal. See the discussion of settings.xml below for one possible solution. If that doesn't work, you can stage the site locally and upload it manually:

    mvn site site:stage -Preporting
    scp -r target/staging/people.apache.org/www/maven.apache.org/shared/maven-XXX YOUR_APACHE_USERNAME@people.apache.org:/www/maven.apache.org/shared/maven-XXX-Y.Z
    
  2. Verify/change folder permissions to 0775 and files permissions to 0664. Log on to people.apache.org and change to the directory above the staging directory. Then run these commands:
    cd /www/maven.apache.org/shared
    find . -type d -exec chmod a+rx,g+w {} \;
    find . -type f -exec chmod 664 {} \;
    

Deploying the release website

After the release has passed, the site needs to be uploaded.

Note: Be sure to generate and deploy the site using the same version of the release. Typically, you need to check out the tag (or go to target/checkout)

You will need to have your people.apache.org credentials in your settings.xml, and you may have to explicitly specify the server ID on the command line to persuade maven to use them.

Due to an apparent problem with the site plugin, passwords don't work reliably for this purpose. SSH keys do. As per the doc for settings.xml, Maven ignores a private key in settings.xml if it sees a password. So, to deploy a site, you should make sure that your settings.xml contains something like:

    <server>
      <id>apache.website</id>
      <username>mortimerqsnerd</username>
      <privateKey>${user.home}/.ssh/id_rsa</privateKey>
    </server>
cd target/checkout
mvn site-deploy -Preporting -DstagingRepositoryId=apache.website

Note: You can not just copy the documentation from the staging site above into the released documentation as the links are not identical. See the email thread http://www.nabble.com/forum/ViewPost.jtp?post=24018250&framed=y

To review the site, wait for the files to arrive at

http://maven.apache.org/shared/maven-XXX/

The wait is necessary to allow the site to be rsync'ed into production.

Updating the Maven site

Check out the maven site project from https://svn.apache.org/repos/asf/maven/site/trunk or pull the latest changes if already checked out.

Update the version number for the component on the src/site/apt/shared/index.apt page.

Commit your changes and then deploy the site.

mvn clean site-deploy