NOTE: This guide is a work in progress.
You’ll need a settings section for repository.apache.org Here’s what an ~/.m2/settings.xml
file might look like:
<settings>
<servers>
<!-- To stage a release of some part of Maven -->
<server>
<id>apache.releases.https</id>
<username>username</username>
<password>********</password>
</server>
</servers>
</settings>
Just replace your username and passwords.
**NOTE: The username and password is your Apache LDAP account.
All subprojects are configured to deploy signatures for the artifacts uploaded to the repository. The gpg plugin will check use the default gpg key for the user deploying the project with the release:perform
directive of the release plugin. This will prompt you for the passphrase for the default key. If you do not have one set up the build will fail.
You can generate and upload a PGP key to a PGP keyserver using the following commands:
gpg --gen-key
gpg --fingerprint
gpg --keyserver subkeys.pgp.net --send-keys <your key's id from last command>
Make sure to have created the .pgpkey in your p.a.o/~ directory and to have added your public key to the KEYS file. See also http://people.apache.org/~henkp/repo/faq.html#4
NOTE: You can also store a GPG key on a Yubikey.
Since we are using Nexus for the release process is as follows (see also Publishing maven artifacts).
You can run a build equivalent to the release process by running:
$ ./mvnw clean install -Papache-release --threads=1
Or by using the Release Plugin with the dryRun
flag:
$ ./mvnw release:prepare -DdryRun=true
Be aware that this phase will ask you about the next version, and most important, for the next SCM tag :
...
[INFO] Checking dependencies and plugins for snapshots ...
What is the release version for "Apache Directory SCIMple"? (org.apache.directory.scimple:scimple) 1.0.0-M1: :
...
What is SCM release tag or label for "Apache Directory SCIMple"? (org.apache.directory.scimple:scimple) 1.0.0-M1: :
...
$ ./mvnw release:clean
$ ./mvnw release:prepare
This creates a git tag.
$ ./mvnw release:perform
This deploys the release to a staging repository.
The sources, binaries and their signatures, have to be pushed in a place where they can be downloaded by the other committers, in order to be checked while validating the release.
If you haven’t checked out this space, do it now :
$ svn co https://dist.apache.org/repos/dist/dev/directory/scimple <directory-scimple-dist-dir>
That will checkout the project distributions.
Now, create a sub-directory for the version you have generated (here, for version 1.0.0-RC1) :
$ mkdir <directory-scimple-dist-dir>/1.0.0-M1
Copy the packages and signature to this area:
$ cd <scimple-source-dir>/target/checkout/target/
$ cp scimple-<version>-* <directory-scimple-dist-dir>/1.0.0-M1
Last, not least, commit your changes
$ svn add <directory-scimple-dist-dir>/1.0.0-M1
$ svn ci <directory-scimple-dist-dir>/1.0.0-M1 -m "Apache SCIMple 1.0.0-M1"
Start a 72h vote at the dev mailing list.
Template:
Subject:
[VOTE] Release Apache Directory SCIMple ${VERSION}
TO: [email protected], [email protected]
This is a call to vote in favor of releasing Apache Directory SCIMple
version ${VERSION}.
<Description of release>
Maven Staging Repo:
https://repository.apache.org/content/repositories/orgapachedirectory-${STAGING_REPO_ID}
https://repository.apache.org/service/local/repositories/orgapachedirectory-${STAGING_REPO_ID}/content/org/apache/directory/scimple/scimple/${VERSION}/scimple-${VERSION}-source-release.zip
Dist Staging Repository:
https://dist.apache.org/repos/dist/dev/directory/scimple/<TBD>/
Project website updates:
<If any>
Guide to testing staged releases:
http://maven.apache.org/guides/development/guide-testing-releases.html
Vote open for 72 hours.
[ ] +1
[ ] +0
[ ] -1 (please include reasoning)
If the vote succeeds the project can be released.
Go to https://repository.apache.org/index.html#stagingRepositories and release the staging repository so all artifacts are published to Maven central.
The sources, binaries and their signatures, have to be pushed in a place where they can be downloaded by users. We use the distribution space for that purpose.
Move the distribution packages (sources and binaries) to the dist SVN repository: https://dist.apache.org/repos/dist/release/directory/scimple/dist/${RELEASE}
$ svn mv https://dist.apache.org/repos/dist/dev/directory/scimple/${RELEASE} https://dist.apache.org/repos/dist/release/directory/scimple.dist/ -m "Adding SCIMple Release ${RELEASE}"
$ cp target/checkout/target/apidocs TODO
TODO
Add release to https://reporter.apache.org/addrelease.html?directory
After 24h, you can now inform the world about the release.
Send a mail to the users and dev mailing list, and one to the [email protected]
You are done !