| ----- |
| Releasing A Maven Plugin |
| ----- |
| Jason van Zyl |
| ----- |
| 2010-07-26 |
| ----- |
| |
| ~~ Licensed to the Apache Software Foundation (ASF) under one |
| ~~ or more contributor license agreements. See the NOTICE file |
| ~~ distributed with this work for additional information |
| ~~ regarding copyright ownership. The ASF licenses this file |
| ~~ to you under the Apache License, Version 2.0 (the |
| ~~ "License"); you may not use this file except in compliance |
| ~~ with the License. You may obtain a copy of the License at |
| ~~ |
| ~~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~~ |
| ~~ Unless required by applicable law or agreed to in writing, |
| ~~ software distributed under the License is distributed on an |
| ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~~ KIND, either express or implied. See the License for the |
| ~~ specific language governing permissions and limitations |
| ~~ under the License. |
| |
| Releasing A Maven Plugin |
| |
| Releasing a Maven plugin is much the same as any other Maven project. The following |
| guide walks through most of the steps: |
| |
| * {{{./maven-project-release-procedure.html} Maven Project Common Release procedure}} |
| |
| Note that plugins 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 plugin parent POM is configured to stage the documentation in a "versioned" directory |
| such as <<</plugins/maven-XXX-plugin-Y.Z>>>. |
| |
| [[1]] Stage the documentation for the current release version (not the new snapshot). |
| |
| +------+ |
| cd target/checkout |
| mvn 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 {{{http://www.apache.org/dev/project-site.html}the sync}}). |
| |
| +-----+ |
| http://maven.apache.org/plugins/maven-XXX-plugin-Y.Z/ |
| +-----+ |
| |
| Some developers have {{{http://www.nabble.com/site%3Astage-deploy-asks-for-a-password--tt15582961s177.html} |
| reported problems}} with the <<<site:stage-deploy>>> goal. In that case, you can stage the site locally and |
| upload it manually: |
| |
| +------+ |
| mvn site:stage -Preporting |
| scp -r target/staging/people.apache.org/www/maven.apache.org/plugins/maven-XXX-plugin YOUR_APACHE_USERNAME@people.apache.org:/www/maven.apache.org/plugins/maven-XXX-plugin-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. That would be <<</www/maven.apache.org/plugins>>> for a plugin. |
| Then run these commands: |
| |
| +------+ |
| 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>>>) |
| |
| +-----+ |
| cd target/checkout |
| mvn site-deploy -Preporting |
| +-----+ |
| |
| <<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/plugins/maven-XXX-plugin |
| +-----+ |
| |
| The wait is necessary to allow the site to be |
| {{{http://www.apache.org/dev/project-site.html}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 plugin on the <<<src/site/apt/plugins/index.apt>>> page. |
| |
| Commit your changes and then deploy the site. |
| |
| +-----+ |
| mvn clean site-deploy |
| +-----+ |
| |