Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2 KB

BUILDING.md

File metadata and controls

61 lines (41 loc) · 2 KB

Building Log4j 2.x

To build Log4j 2.x, you need Java 8 and Java 11 compilers, and Apache Maven 3.x.

Log4j 2.x uses the Java 11 compiler in addition to the Java version installed in the path. This is accomplished by using Maven's toolchains support. Log4j 2 provides sample toolchains XML files in the root folder. This may be used by modifying it and installing the file as toolchains.xml in the .m2 folder or by using the following when invoking Maven.

[Macintosh] -t ./toolchains-sample-mac.xml
[Windows] -t ./toolchains-sample-win.xml
[Linux] -t ./toolchains-sample-linux.xml

To perform the license release audit, a.k.a. "RAT check", run.

mvn apache-rat:check

To install the jars in your local Maven repository, from a command line, run:

mvn clean install

Once install is run, you can run the Clirr check on the API and 1.2 API modules:

mvn clirr:check -pl log4j-api

mvn clirr:check -pl log4j-1.2-api

Next, to build the site:

mvn site

On Windows, use a local staging directory, for example:

mvn site:stage-deploy -DstagingSiteURL=file:///%HOMEDRIVE%%HOMEPATH%/log4j

On UNIX, use a local staging directory, for example:

mvn site:stage-deploy -DstagingSiteURL=file:///$HOME/log4j

To test, run:

mvn clean install