This is the new release process for Apache Felix, based on the updated Maven process
To prepare or perform a release you MUST BE at least an Apache Felix Committer.
In the past we staged release candidates on our local machines using a semi-manual process. Now that we inherit from the Apache parent POM version 5, a repository manager will automatically handle staging for you. This means you now only need to specify your GPG passphrase in the release profile of your ${user.home}/.m2/settings.xml:
<settings>
...
<profiles>
<profile>
<id>release</id>
<properties>
<gpg.passphrase> <!-- YOUR KEY PASSPHRASE --> </gpg.passphrase>
</properties>
</profile>
</profiles>
...
</settings>
|
Everything else has been configured in the latest Felix parent POM:
<parent>
<groupId>org.apache.felix</groupId>
<artifactId>felix-parent</artifactId>
<version>1.2.0</version>
<relativePath>../pom/pom.xml</relativePath>
</parent>
|
First prepare your POMs for release:
mvn release:prepare -DdryRun=truepom.xml with the one called 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 on 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$ mvn deploy ... [INFO] [deploy:deploy] [INFO] Retrieving previous build number from apache.snapshots.https ... |
mvn release:clean mvn release:prepare |
mvn release:perform |
When running the mvn release:prepare command on Mac OS X, you might see the following error:
[INFO] Executing: svn --non-interactive commit --file /tmp/maven-scm-802409492.commit --targets /tmp/maven-scm-18804-targets [INFO] Working directory: /homedir/dev/felix/dependencymanager [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Unable to commit files Provider message: The svn command failed. Command output: svn: Commit failed (details follow): svn: MKACTIVITY of '/repos/asf/!svn/act/4f11ad5d-9161-0410-b4dd-cb727141ea8c': authorization failed (https://svn.apache.org) |
This is due to a bug in Subversion on the Mac, as described by Brett Porter in his blog. He proposes putting an "svn" script at the head of your path to fix the issue.
If you're releasing bundles, you can also add them to the Felix Release OBR. To do this, execute the following command:
mvn clean install \
org.apache.felix:maven-bundle-plugin:deploy \
-DprefixUrl=http://repo1.maven.org/maven2 \
-DremoteOBR=releases.xml \
-DaltDeploymentRepository=apache.releases::default::scp://people.apache.org/www/felix.apache.org/obr
|
The http://felix.apache.org/obr/releases.xml page is automatically updated during the web site synchronization.
Note: the project building the bundle must use the maven-bundle-plugin and use a version superior or equal to 1.4.2.