Before beginning your first release, take the following preparatory steps:
Run mvn clean install
on the project to make sure it will build cleanly.
Login to https://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://keyserver.ubuntu.com. Also make sure the public key is published to https://www.apache.org/dist/logging/KEYS.
git config user.signingkey 0x1234567812345678
user.name
and user.email
git config values match the name and email of this GPG key.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 the Log4jReleaseVersion
property to the version you are releasing.
Make a fresh Git clone of the master branch of https://github.com/apache/logging-log4j2.git.
src/changelog/.changelog.adoc.ftl with the appropriate release text.
Run
mvn -P changelog-release validate |
to generate the changelog for the release. After running delete directory src/changelog/2.x.x. (This will need to be recreated later).
Run
mvn clean site |
to build the web site.
Run git add
, git commit
, and git push
to commit the RELEASE-NOTES.md
file that was just generated along with the other files that were modified.
Copy the site:
mvn site:stage -DstagingDirectory=$HOME/log4j |
where $HOME
is your home directory and verify that the site looks good. Repeat steps 6-10 as necessary.
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 run mvn site:stage -DstagingDirectory=$HOME/log4j
where $HOME is your home directory.
Zip the contents of $HOME/log4j
with zip -r log4j.zip log4j
.
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.
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=7 -nH -r -p -np --no-check-certificate $LINK |
where $LINK
is the URL to the repository you just closed (plus the org/apache/logging/log4j/
path appended).
Create a new (immutable) tag named rel/n.n
from the log4j-n.n.n-rcn
tag by changing to the changing to the directory containing the source for the release and performing
git tag [--local-user userId] -s rel/n.n.n -m "Release n.n.n of Log4j" |
where --local-user is optional, followed by
git push --tags |
Checkout https://dist.apache.org/repos/dist/release/logging/log4j.
Create the release directory under the log4j directory.
Example:
# create directory for release svn mkdir https://dist.apache.org/repos/dist/release/logging/log4j/n.n.n svn commit # move files from dev to release (fully server-side; no more uploads!); this action is its own commit svn mv $(svn ls '^/dev/logging/log4j' | grep apache-log4j-n.n.n | xargs printf '^/dev/logging/log4j/%s ') '^/release/logging/log4j/n.n.n' # remove previous release svn rm https://dist.apache.org/repos/dist/release/logging/log4j/n.n.n-1 svn commit |
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).
See ManagingTheWebSite regarding sub-projects.
In your log4j web site repo checkout the asf-site branch. Perform git checkout asf-site
then git rebase asf-staging
and finally git push
. Wait 5 to 10 minutes and verify the web site is live.
After the website is updated, send the release announcement email. This should be sent out to dev@logging.apache.org and log4j-user@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 and you send the email from your ASF email.
If the release fails before sending the vote email:
Login to https://repository.apache.org using your ASF credentials. Select "Staging Repositories" then check the org.apache.logging repository and drop it.
If the release fails after sending the vote email:
Login to https://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.
Restart the release process as a new release candidate.