Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add note about checking out target branch

...

  1. Grab the latest source from Git and checkout the target branch to build from

    Code Block
    languagetext
    git clone https://git-wip-us.apache.org/repos/asf/camel.git
    cd camel
    
    git checkout BRANCH_NAME   # e.g. BRANCH_NAME = camel-2.16.x
  2. Verify headers with rat

    Code Block
    languagetext
    mvn -e org.apache.rat:apache-rat-plugin:check
    grep -e ' !?????' target/rat.txt   # will show any files without licenses
    

    The grep command will return a list of files that don't have correct license headers. If nothing is returned, you can proceed with the next step. Otherwise fix the license header in all listed files and invoke both commands again until no files are returned.

    Info

    Because of MRELEASE-812, you should use the following setting:

    Code Block
    languagetext
    LANG='en_US.UTF-8'
    
  3. Do a release dry run to check for problems

    Code Block
    languagetext
    mvn release:prepare -DdryRun=true -Prelease
    

    Check that you are happy with the results. The poms for the proposed tags will be in pom.xml.tag. Check also the generated signature files:

    Code Block
    languagetext
    cmueller$ gpg camel-core/target/camel-core-2.7.5-SNAPSHOT.jar.asc 
    gpg: Signature made Tue Jan 10 20:50:27 2012 CET using RSA key ID 2A239C2C
    gpg: Good signature from "Christian Mueller (CODE SIGNING KEY) <cmueller@apache.org>"
    
  4. Prepare the release

    When you like the results, clean up:

    Code Block
    languagetext
    mvn release:clean -Prelease

    NOTE: If your git doesn't remember the username and password, you need pass it to the mvn plugin, otherwise the release plugin will wait forever. 

    Code Block
    languagetext
    mvn release:prepare -Dusername=USERNAME -Dpassword=PASSWORD -Prelease
    

    This will create the tag in svn and leave various stuff around locally to direct the perform phase.

    Info

    Note: If you're located in Europe then release:prepare may fail with 'Unable to tag SCM' and 'svn: No such revision X'. Wait 10 seconds and run

    Code Block
    languagetext
    mvn release:prepare -Prelease
    

    again.

  5. Perform the release to the staging repo

    Code Block
    languagetext
    mvn release:perform -Prelease
    
  6. Close the staging repository
    Quote from the Maven release guide for Apache projects

    Login to https://repository.apache.org using your Apache LDAP credentials. Click on "Staging Repositories". Then select "org.apache.camel-xxx" in the list of repositories, where xxx represents your username and ip. Click "Close" on the tool bar above. 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. Enter the name and version of the artifact being released in the "Description" field and then click "Close". This will make it easier to identify it later.

    See the screenshot below that shows the state of the staging repository at this stage.



  7. Verify staged artifacts
    Quote from the original guide

    If you click on your repository, a tree view will appear below. You can then browse the contents to ensure the artifacts are as you expect them. Pay particular attention to the existence of *.asc (signature) files. If the you don't like the content of the repository, right click your repository and choose "Drop". You can then rollback your release and repeat the process.
    Note the repository URL, you will need this in your vote email.

...