Building Apache log4j


This is a detailed instruction to reproduce the log4j distribution either to verify that the release is reproducable or to prepare a hot-fix.

The log4j build is platform dependent. The best is to setup a VM using virtualbox (or similar), install Ubuntu and follow the steps here.

Preparation of environment

Install Sun Java 6

$> sudo sed  's/restricted/restricted universe multiverse/' -i /etc/apt/sources.list
$> sudo apt-get update && sudo apt-get -y update
$> sudo apt-get install openjdk-6-jdk

Install Maven 2, Subversion, mingw and xemacs21, openssh-server:

$> sudo apt-get install maven2 subversion mingw32 xemacs21 openssh-server

Copy Win32 version of jni_md.h for NTEventLogAppender.dll

c:\>cd "\Program Files\Java\jdk_1.6.0_16\include\win32
c:\>scp jni_md.h username@hostname:

$> export JNI_WIN32_INCLUDE_DIR=/home/username

Signing & Deploying

Create a local ssh key with no passphrase to enable "deployment" of site back to the local machine using scp.

$> ssh-keygen
$> cd ~/.ssh
$> cat >> authorized_keys
$> ssh localhost
$> exit

It's important to add localhost and people.a.o to the list of permanent allowed hosts. Besides the above, this should have been runned at least once:

$> ssh

If you intended to deploy jars to the repo or update the site, you need to set up ssh to use private keys to access and create or modify ~/.m2/settings.xml to specify user name and key location.

<settings xmlns=""
      <username>USERNAME for</username>

You should test your ssh connection to and localhost before attempting a deployment like:

$ ssh -l USERNAME
$ ssh localhost

Building release artifacts

Before you build, please make sure you have a nonblocking editor set as SVN editor. Like:

$ export SVN_EDITOR=xemacs

Other checks:

  • Please make sure changes.xml reflect all fixed issues. The release date in changes is to be set to the date the release candidate is created.
  • Please update doap_log4j.rdf to reflect the correct version. Use the same release date as in changes.

The release artifacts were originally built by:

$> svn co log4j
$> cd log4j
$> mvn package release:prepare
$> mvn release:perform

Note: you'll be ask for a SVN tagname. Please use the following pattern: v1.2.17-RC1.

Attention: this is an non-interactive build. In some cases it is necessary to add: -Dusername=paouser -Dpassword=paopassword to the release plugin commands. This is surely not safe because your password can be seen clearly.

The release artifacts can be rebuilt by:

$ mvn release:perform -DconnectionUrl=scm:svn:

Building site and artifacts from a tag:

$ svn co
$ cd v1_2_16
$ mvn site assembly:assembly

TODO: the following section describes site staging. This must be altered: the staging must not happen in SVN.

The website content will automatically be staged to the ASF SVN repo by "mvn site-deploy". This phase checks out into target/site-deploy, copys the generated documentation to that directory using scp to localhost and then commits the changed content. You will be prompted for an SVN commit message using the configured SVN_EDITOR. A commit message must be entered or the site commit will be aborted.

The staged content can be tested by opening, however some links may be broken due to the staged location. The staged version can be published to the main public site by executing "svn update" in /www/ on

If a vote has failed

  • Send a "cancel" note to the mailinglist (usually resend the vote mail with [CANCEL] in subject
  • Delete the RC artifacts from:

If a vote has passed

If a RC has passed the vote, these steps are necessary:

Rename the tag:

$> svn mv

Change the pom.xml version to the prior version number.