Before beginning your first release, take the following preparatory steps:
- Make sure you have Java 8 as the default JDK.
Run
mvn clean install
on the project to make sure it will build cleanly.Run
mvn -P rat -DskipTests
clean verify
to verify all the licenses are valid.Login to http://repository.apache.org using your ASF credentials. Click on your username in the upper-right-hand corner and click Profile. Make sure your email address is correct. If not, contact Infra to get it corrected. You will be unable to get the necessary notifications until it's corrected.
Make sure you have a 4096-bit RSA PGP key pair for code signing. The public key should be published in a public repository, preferably http://pgp.mit.edu/. Also make sure the public key is published to http://www.apache.org/dist/logging/KEYS.
- Configure this key as your git signing key for release tags:
git config user.signingkey 0x1234567812345678
Edit
~/.m2/settings.xml
to add the corresponding private key and its passphrase to your settings. Also add the Apache Subversion server credentials and Sonatype repository credentials to your settings (this is your ASF credentials). You'll want to blank out the passphrase after each release and fill it back in prior to each release so that it isn't compromised. Alternatively, you can encrypt your passwords with a master password.
<profiles> <profile> <id>apache-release</id> <properties> <gpg.keyname>ABC123FC</gpg.keyname> <gpg.passphrase>thisIsMyPassphrase</gpg.passphrase> <gpg.executable>gpg2</gpg.executable><!-- Use this if executable differs from "gpg" --> </properties> </profile> </profiles> <activeProfiles> <activeProfile>apache-release</activeProfile> </activeProfiles> ... <servers> <server> <id>svn.apache.org</id> <username>myUsername</username> <password>myPassword</password> </server> <server> <id>apache.releases.https</id> <username>myUsername</username> <password>myPassword</password> </server> <server> <id>apache.snapshots.https</id> <username>myUsername</username> <password>myPassword</password> </server> </servers>
Once you've done this, take the following steps to perform a release:
Edit
pom.xml
and change theLog4jReleaseVersion
property to the version you are releasing.Make a fresh Git clone of the master branch of https://github.com/apache/logging-log4j2.git.
Update
src/changes/announcement.vm
Run
mvn -P release-notes generate-resources
to create the release notes.Update
src/changes/changes.xml
with the release date.- Pick a logo from
src/site/resources/logos
. Edit it with Gimp to add the release version number and save it as a png. Copy the saved logo tosrc/site/resources/images/logo.png
. Run
git add
,git commit
, andgit push
to commit theRELEASE-NOTES.md
file that was just generated along with the other files that were modified.Run
mvn site
followed bymvn site:stage -DstagingDirectory=$HOME/log4j
where$HOME
is your home directory and verify that the site looks good.Run
mvn -P apache-release -DskipTests -Darguments="-DskipTests" release:prepare release:perform -DreleaseVersion=n.n.n -DdevelopmentVersion=n.n.n-SNAPSHOT -Dtag=log4j-n.n.n-rcn
to start the release. Enter the password to your signing key when prompted.Login to http://repository.apache.org using your ASF credentials. Select "Staging Repositories" then check the org.apache.logging repository and close it.
Check out the release tag that was created via the Maven release plugin using
git checkout tags/tagname
.Run
mvn site
in the tag directory. When that completes runmvn site:stage -DstagingDirectory=$HOME/log4j
where $HOME is your home directory.Zip the contents of
$HOME/log4j
withzip -r log4j.zip log4j
. Commit the site to your github.io account.- TODO: this can potentially be done via an
asf-staging
branch as detailed in git - .asf.yaml features.
- TODO: this can potentially be done via an
Copy the distribution archive files from
log4j-distribution/target
to where https://dist.apache.org/repos/dist/dev/logging/log4j/ is checked out on your machine.Generate the sha512 checksum of the bin and source archive files using
sha512sum apache-log4j-2.x-xxx.zip > apache-log4j-2.x-xxx.zip.sha512
, orgpg --print-md SHA512 apache-log4j-2.x-xxx.zip > apache-log4j-2.x-xxx.zip.sha512
.
Add the site zip to where https://dist.apache.org/repos/dist/dev/logging/log4j/ is checked out on your machine.
Sign the site ZIP file using
gpg --armor --output apache-log4j-2.x-site.zip.asc --detach-sig apache-log4j-2.x-site.zip
. You can use the --local-user [key ID] option (it must come before --detach-sig) to specify the exact key to use when signing the ZIP file.Generate the sha512 checksum of the site zip using
sha512sum apache-log4j-2.x-site.zip > apache-log4j-2.x-site.zip.sha512
, orgpg --print-md SHA512 apache-log4j-2.x-site.zip > apache-log4j-2.x-site.zip.sha512
.
- Generate the release vote email:
Create the email addressed to dev@logging.apache.org. Sending the email to the PMC is not necessary.
Copy the changes in the release from
RELEASE-NOTES.txt
into the email.Provide a link to the tag, web site on http://people.apache.org, and the artifacts in the Nexus repository.
Provide the command to download all the artifacts:
wget -e robots=off --cut-dirs=3 -r -p -np --no-check-certificate $LINK
where $LINK is the URL to the repository you just closed (plus theorg/apache/logging/log4j/
path appended).
- If the release vote fails proceed as described in the section below, otherwise if it passes:
Create a new (immutable) tag named
rel/n.n
from thelog4j-n.n-rcn
tag by changing to the changing to the directory containing the source for the release and performinggit tag -s rel/n.n -m "Release n.n of Log4j"
followed bygit push --tags
- The following steps must be performed by a PMC member:
Checkout https://dist.apache.org/repos/dist/release/logging/log4j.
Create the release directory under the log4j directory.
- Move all the distribution artifacts from the distribution dev location to that directory.
Perform an svn add of the release directory.
- Commit the release to Subversion.
- Login to reporter.apache.org and add the release version and date.
- The following steps can then be taken by whomever started the release:
- Delete the core-its project from the Nexus repository.
- Release the remaining artifacts in the Nexus Repository.
- Wait 12-24 hours (or after the distribution artifacts have been propagated to the mirrors and the Maven artifacts have been propagated to the Central Repository), and then the following steps must be performed by a PMC member:
Perform svn delete on the previous release directory for the same version under the log4j directory (https://dist.apache.org/repos/dist/release/logging/log4j).
- Commit the delete to Subversion.
See ManagingTheWebSite regarding sub-projects.
- Copy the release web site from the local directory where it was deployed into the sub-project directory and make it be the current link.
After the website is updated, send the release announcement email. This should be sent out to dev@logging.apache.org, log4j-user@logging.apache.org, private@logging.apache.org, and general@logging.apache.org.
Send the release announcement to announce@apache.org using your apache.org email address. This can be combined with the previous step as a Cc field as long as the To field is the dev@ list.
If the release fails before sending the vote email:
Login to http://repository.apache.org using your ASF credentials. Select "Staging Repositories" then check the org.apache.logging repository and drop it.
- Revert any changes that have not been committed.
- Restart the release process as the same release candidate.
If the release fails after sending the vote email:
Login to http://repository.apache.org using your ASF credentials. Select "Staging Repositories" then check the org.apache.logging repository and drop it.
Rename the release tag in Git to add rcn to the end of the tag. Note that this may not be possible in Git depending on configuration
Restart the release process as a new release candidate.