How to create and announce a Karaf release.

Required tools, practices and resources

Prepare

To prepare and perform a release you must be at least at Apache Karaf Committer.

Your settings.xml should look like:

<settings>
  ...
  <profiles>
    <profile>
      <id>release</id>
      <properties>
        <gpg.passphrase> <!-- YOUR KEY PASSPHRASE --> </gpg.passphrase>
      </properties>
    </profile>
  </profiles>
  ...
  <servers>
    <!-- To publish a snapshot of some part of Maven -->
    <server>
      <id>apache.snapshots.https</id>
      <username> <!-- YOUR APACHE SVN USERNAME --> </username>
      <password> <!-- YOUR APACHE SVN PASSWORD --> </password>
    </server>
    <!-- To stage a release of some part of Maven -->
    <server>
      <id>apache.releases.https</id>
      <username> <!-- YOUR APACHE SVN USERNAME --> </username>
      <password> <!-- YOUR APACHE SVN PASSWORD --> </password>
    </server>
    ...
  </servers>
</settings>

Staging the Release Candidate

  1. Grab the latest source
    svn co https://svn.apache.org/repos/asf/karaf/trunk
    
  2. Prepare your POMs for release:
    1. make sure there is no snapshots in the POMs to be released
    2. make sure everything builds fine
    3. check that your POMs will not lose content when they are rewritten during the release process:
      mvn release:prepare -DdryRun
      
      Please diff the original pom.xml with the one named pom.xml.tag to see if the license or any other info has been removed. This has been known to happen if the starting <project> tag is not a single line. The only things that should be different between these files are the <version> and <scm> elements. If there are any other changes, you must fix the original pom.xml file and commit before proceeding with the release.
    4. publish a snapshot
      $ mvn deploy
      ...
      [INFO] [deploy:deploy]
      [INFO] Retrieving previous build number from apache.snapshots.https
      ...
      
      If you experience an error during deployment like a HTTP 401 check your settings for the required server entries as outlined in the Prerequisites
      Be sure that the generated artifacts respect the Apache release rules: NOTICE and LICENSE files should be present in the META-INF directory within the jar. For sources artifacts, be sure that your POM does not use the maven-source-plugin:2.0.3 which is broken. The recommended version at this time is 2.0.4
      You should verify the deployment under the snapshot repository on Apache
  3. Prepare the release
    mvn release:clean
    mvn release:prepare
    
  4. Stage the release for a vote
    mvn release:perform
    
    The release will automatically be inserted into a temporary staging repository for you, see the Nexus staging documentation for full details
    You can continue to use mvn release:prepare and mvn release:perform on other sub-projects as necessary on the same machine and they will be combined in the same staging repository
  5. Close the staging repository
    Login to https://repository.apache.org using your Apache SVN credentials. Click on Staging on the left. Then click on org.apache.karaf in the list of repositories. In the panel below you should see an open repository that is linked to your username and IP. Right click on this repository and select Close. This will close the repository from future deployments and make it available for others to view. If you are staging multiple releases together, skip this step until you have staged everything
  6. Verify the staged artifacts

Starting the vote

Propose a vote on the dev list with the closed issues, the issues left, and the staging repository - for example:

TODO

Wait for the Results

TODO

Canceling the Release

TODO

Promoting the Release

TODO

Update JIRA

TODO

Announcing the Karaf Release

TODO