You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@portals.apache.org by Apache Wiki <wi...@apache.org> on 2010/04/09 16:18:46 UTC

[Portals Wiki] Update of "FrontPage/HowtoUseNexusForRelease" by AteDouma

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Portals Wiki" for change notification.

The "FrontPage/HowtoUseNexusForRelease" page has been changed by AteDouma.
http://wiki.apache.org/portals/FrontPage/HowtoUseNexusForRelease?action=diff&rev1=5&rev2=6

--------------------------------------------------

  
  This page provides some additional notes how to use Nexus for performing a release.
  
- These notes are intended to be used together with the Apache Portals portals-pom-1.2 or later: http://svn.apache.org/repos/asf/portals/portals-pom/tags/portals-pom-1.2/pom.xml
+ These notes are intended to be used together with the Apache Portals portals-pom-1.3 or later: http://svn.apache.org/repos/asf/portals/portals-pom/tags/portals-pom-1.3/pom.xml
  
- The primary source and instructions are provided here: http://maven.apache.org/developers/release/releasing.html
+ The primary source and instructions are provided here: http://maven.apache.org/developers/release/apache-release.html
  
  ''For the remainder of this page, the primary source will be referred to as the '''main doc'''.''
  
  = Prerequisites: =
- 
   * Ensure you can login on https://repository.apache.org with your Apache SVN username and password
  
   * Ensure you have been given the appropriate rights on Nexus to access the '''Enterprise->Staging''' left-side menu item.
- 
-    ''If you don't have the appropriate rights (but you should have) you might get a 401 error, in which case you need to contact the Apache Repository team to have it corrected.''    
+   . ''If you don't have the appropriate rights (but you should have) you might get a 401 error, in which case you need to contact the Apache Repository team to have it corrected.''
  
   * Define the following GPG configuration setup in a profile named ''''apache-release'''' within your local maven settings ''(~/.m2/settings.xml)'':
  
-    ''Note: the '''main doc''' incorrectly uses the name '''release''' for this profile''
  {{{
  <settings>
    ...
@@ -30, +27 @@

        <properties>
          <gpg.passphrase> <!-- YOUR KEY PASSPHRASE --> </gpg.passphrase>
          <!-- optional:
-              if you have multiple user-ids and need to use the not defauult user-id,
+              if you have multiple user-ids and need to use the not default user-id,
-              specify gpg.keyname which will be passed on to gpg as --local-user 
+              specify gpg.keyname which will be passed on to gpg as --local-user
          <gpg.keyname> YOUR LOCAL USER-ID TO SIGN </gpg.keyname>
          -->
          <!-- ignored:
-              gpg.useAgent doesn't work although it is a documented property for the gpg-plugin 
+              gpg.useAgent doesn't work although it is a documented property for the gpg-plugin
             <gpg.useAgent>true</gpg.useAgent>
-         --> 
+         -->
        </properties>
      </profile>
    </profiles>
    ...
  </settings>
  }}}
+  * Define the following required Apache Servers in your local maven settings ''(~/.m2/settings.xml)'', see also: http://maven.apache.org/developers/committer-settings.html
  
-  * Define the following required Apache Servers in your local maven settings ''(~/.m2/settings.xml)'', see also: http://maven.apache.org/developers/committer-settings.html
  {{{
  <settings>
  ...
@@ -80, +77 @@

    </servers>
  </settings>
  }}}
- 
-  * Make sure your root project pom.xml inherits directly or indirectly from the Apache Portals portals-pom version 1.2 or later
+  * Make sure your root project pom.xml inherits directly or indirectly from the Apache Portals portals-pom version 1.3 or later
- 
-  * Make sure as the minimum to have the following profile defined in your root project pom.xml:
- {{{
-   <profiles>
-     <profile>
-       <id>apache-release</id>
-       <build>
-         <plugins>
-           <plugin>
-             <!-- only include this in top level project poms -->
-             <groupId>org.apache.maven.plugins</groupId>
-             <artifactId>maven-assembly-plugin</artifactId>
-           </plugin>
-         </plugins>
-       </build>
-     </profile>
-   </profiles>
- }}}
- 
-   Note: there is an open issue for how we use and configure the maven-assembly-plugin in the portals-pom-1.2: http://issues.apache.org/jira/browse/PORTALS-16
  
  = Step 1: Prepare your POMs for release =
+  * Make sure there are no snapshots in the POMs to be released
+   . If you are staging multiple release candidates which are dependent, e.g project B-1.0-SNAPSHOT -> A-1.0-SNAPSHOT, you will have to manually update B-1.0-SNAPSHOT -> A-1.0 before you can start releasing project B through Nexus.
  
-  * Make sure there are no snapshots in the POMs to be released
-    
-    If you are staging multiple release candidates which are dependent, e.g project B-1.0-SNAPSHOT -> A-1.0-SNAPSHOT,
-    you will have to manually update B-1.0-SNAPSHOT -> A-1.0 before you can start releasing project B through Nexus.
-  
   * Make sure the '''scm''' tag within the root pom.xml '''''exactly''''' matches the current SVN location of the pom.xml itself.
  
   * If you have a multi-project with nested modules, ensure they have either their own '''scm''' tag configured correctly too, or not defined at all.
  
+  * RAT check your project sources required license headers using apache-rat-plugin (defined in the portals-pom) using: '''{{{mvn install -P rat}}}'''
+ 
  = Step 2: Publish a snapshot =
+  * first make sure to start with a clean/pristine checkout of the project, run at least {{{mvn clean}}}
  
-   * first make sure to start with a clean/pristine checkout of the project, run at least {{{mvn clean}}}
+  * ''If you followed the advise in the '''main doc''' for the previous step by running ''{{{mvn release:prepare -DdryRun=true}}}'', make sure to run ''{{{mvn release:clean}}}'' first before continuing''
  
-   * ''If you followed the advise in the '''main doc''' for the previous step by running ''{{{mvn release:prepare -DdryRun=true}}}'', make sure to run ''{{{mvn release:clean}}}'' first before continuing''
+  * '''{{{mvn deploy}}}'''
+   . If you experience an error during deployment like a HTTP 401 check your settings for the required server entries as outlined in the Prerequisites.
  
-   * '''{{{mvn deploy}}}'''
- 
-     If you experience an error during deployment like a HTTP 401 check your settings for the required server entries as outlined in the Prerequisites.
- 
-   * verify the deployment under Maven Snapshot repository on Apache (Nexus: Repositories->Snapshots)
+  * verify the deployment under Maven Snapshot repository on Apache (Nexus: Repositories->Snapshots)
  
  = Step 3: Prepare the release =
-  
-  * Make sure to start clean by running '''{{{mvn release:clean}}}'''
+  * Make sure to start clean by running '''{{{mvn release:clean clean}}}'''
  
   * '''{{{mvn release:prepare}}}'''
+  If you experience a BUILD FAILURE because of svn failing to commit with an error message like: ''{{{svn: The specified baseline is not the latest baseline, so it may not be checked out.}}}'':
+   * when using the SVN EU mirror it might occur when the SVN server sync hasn't been completed yet, causing the SVN EU mirror to be slightly out-of-sync temporarily
  
-  If you experience a BUILD FAILURE because of svn failing to commit with an error message like: ''{{{svn: The specified baseline is not the latest baseline, so it may not be checked out.}}}'':
+   * try running '''{{{svn up}}}''' and '''{{{mvn release:prepare}}}''' one or more times again, it usually completes successfully after one or more retry.
  
-     * when using the SVN EU mirror it might occur when the SVN server sync hasn't been completed yet, causing the SVN EU mirror to be slightly out-of-sync temporarily
-     
-     * try running '''{{{svn up}}}''' and '''{{{mvn release:prepare}}}''' one or more times again, it usually completes successfully after one or more retry.
- 
-     * if it keeps failing, you can restart from scratch by running '''{{{mvn release:rollback}}}''' first, see also: http://maven.apache.org/plugins/maven-release-plugin
+   * if it keeps failing, you can restart from scratch by running '''{{{mvn release:rollback}}}''' first, see also: http://maven.apache.org/plugins/maven-release-plugin
  
  = Step 4: Stage the release =
- 
   * '''{{{mvn release:perform}}}'''
+   . This will create a new temporary Nexus staging repository and upload to it, or append to it if you are combining multiple release candidates together. This temporary staging repository, while still open (see next step) will only be visible and accessible by yourself until closed (next step). Once the staging repository is closed, you can no longer add more release candidates to it.
- 
-    This will create a new temporary Nexus staging repository and upload to it, or append to it if you are combining multiple release candidates together.
-    This temporary staging repository, while still open (see next step) will only be visible and accessible by yourself until closed (next step).
-    Once the staging repository is closed, you can no longer add more release candidates to it.
- 
-    See http://www.sonatype.com/books/nexus-book/reference/staging.html for further details.
+   See http://www.sonatype.com/books/nexus-book/reference/staging.html for further details.
  
  = Step 5: close the staging repository =
- 
  Follow the instructions as described in the '''''main doc''''' once you've released '''all''' candidates you intended to, otherwise repeat the above steps for additional release candidates first.
- 
- The current '''''main doc''''' describe how to '''close''' your staging repository by using right click on the status field and choose '''{{{Finish}}}'''. However, for the current Nexus installation
- this action menu item now is called '''{{{Close}}}'''.
  
  Once the staging repository is closed, its repository path becomes public accessible, so you can use that as reference in the VOTE email to send out in the next steps.
  
  = Step 6 and later =
-   
  Just follow the instructions as provided in the '''''main doc'''''