...
Before you deploy anything to the maven repository using Maven 2, you should configure your ~/.m2/settings.xml file
so that the file permissions of the deployed artifacts are group writeable. If you do not do this, other developers will not able to overwrite your SNAPSHOT releases with newer versions.
Code Block |
|
|
<settings>
...
<servers>
<server>
<id>apache.snapshots.https</id>
<username>dejanb</username>
</server>
<!-- To publish a website of some part of Maven -->
<server>
<id>apache.website</id>
<username>dejanb</username>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
<!-- To stage a release of some part of Maven -->
<server>
<id>apache.releases.https</id>
<username>dejanb</username>
</server>
<!-- To stage a website of some part of Maven -->
<server>
<id>stagingSite</id> <!-- must match hard-coded repository identifier in site:stage-deploy -->
<username>dejanb</username>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</server>
</servers>
...
</settings>
|
It is also essential that you configure your umask to 2 on people.apache.org for non-interactive login. If your shell is tcsh you can edit .cshrc to include
Code Block |
umask 2
|
Other shell initialization files may interfere with this setting but if this is the only umask setting it appears to work. Instructions for other shells would be welcome.
...
To effectively use the release and staging plugins you need some information about where the staging will happen and signing information for gpg. Your ~/.m2/settings.xml should contain a profile like this:
Code Block |
|
|
<settings>
<profiles>
<profile>
<id>apache-release</id>
<properties>
<gpg.passphrase>secretPhrase</gpg.passphrase>
</properties>
</profile>
</profiles>
...
</settings>
|
...
The release plugin will prompt for a release version, tag and next release version. Use a three digit release version of the form: 5.x.x and for the tag use a string of the form: activemq-5.x.x. The next version string should use the two digit from: 5.x-SNAPSHOT as this can be consistent for future SNAPSHOT releases.
-
Verify the to-be-released version identifier exists in the META-INF/spring.schema mappings file, if not add it and commit. It should contain:
Code Block |
http\://activemq.apache.org/schema/core/activemq-core-${pom.version}.xsd=activemq.xsd |
-
Verify headers with rat
Code Block |
mvn -e apache-rat:check
grep -e ' !?????' target/rat.txt -- will show any files without licenses
|
-
Do a release dry run to check for problems
Code Block |
mvn release:prepare -DdryRun=true
|
Check that you are happy with the results. The poms for the proposed tags will be in pom.xml.tag. When you like the results, clean up:
Code Block |
mvn release:clean
|
-
Prepare the release
Code Block |
mvn release:prepare
|
This will create the tag in git and leave various stuff around locally to direct the perform phase.
-
Make a local copy of the release configuration in case something goes wrong
Code Block |
cd ..
cp -r activemq-release activemq-release-prepared
cd activemq-release
|
-
Perform the release to the staging repo
Code Block |
mvn release:perform
|
This uses both the activemq release profile which directs building source jars, javadoc jars, and signing everything, and also the settings release profile that says where to
put stuff and how to sign it.
- 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". Then click on "maven" 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. 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 image in the original guide for more info.
- 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.
-
Stage the maven generated site
Note that the -Prelease profile is needed to specify the profile in settings.xml that configures the staging location.
Build the site from the tag that release:perform checked out into target/checkout in the previous step.
Code Block |
cd target/checkout
mvn site site:deploy -Prelease
|
This will copy to the staging.siteURL set up in your settings.xml release profile.
- Call a vote on the dev list, listing the great new features of the release.
- After it passes, promote the release
-
replicate the contents of mvn apache-activemq/<version> directory to the dist website on people.apache.org
No Format |
ssh [apacheId]@people.apache.org
mdir siteUpdate;cd siteUpdate
curl --remote-name-all https://repository.apache.org/content/repositories/releases/org/apache/activemq/activemq-parent/<version>/activemq-parent-<version>{.pom,-source-release.zip}{.asc,.asc.md5,.asc.sha1,.sha1,.md5,}
curl --remote-name-all https://repository.apache.org/content/repositories/releases/org/apache/activemq/apache-activemq/<version>/apache-activemq-<version>{.pom,-bin.tar.gz,-bin.zip}{.asc,.asc.md5,.asc.sha1,.sha1,.md5,}
mkdir /www/www.apache.org/dist/activemq/apache-activemq/<version>
mv * /www/www.apache.org/dist/activemq/apache-activemq/<version>
chmod -R g+w /www/www.apache.org/dist/activemq/apache-activemq/<version>
|
-
Populate the schema site in svn
No Format |
svn co https://svn.apache.org/repos/infra/websites/production/activemq/content
cd content/schema/core
curl --remote-name-all https://repository.apache.org/content/repositories/releases/org/apache/activemq/activemq-spring/<version>/activemq-spring-<version>{-schema.html,.xsd}{.asc,.asc.md5,.asc.sha1,.sha1,.md5,}
for i in activemq-spring-5.9.0*; do mv -- "$i" "${i//spring/core}"; done;
svn add activemq-core-5.9.0*
svn rm activemq-core.xsd
ln -s activemq-core-5.9.0.xsd activemq-core.xsd
and commit once it looks good.
|
- Continue with the Announcing section below
- Created a in progress wiki page for the next release
...
- Perform a release in JIRA and create a new release version in JIRA.
- Move unresolved issues to the next release first, in a bulk (do not send email) update
- You might also want to search for resolved/closed issues with no fix version just in case
- Create a download page for the release in the WIKI similar like the ActiveMQ 5.3.0 Release; also update the main Download page as appropriate
- Update the Xml Reference page with a link to the HTML and XSD
- Update latest release link on home page
- Update QuickLinks and JavaDocs pages
- Mail the dev & user lists
- Post a news entry on the WIKI
- tweet
- Have a beer!
![(smile)]()