Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 2.18.0 removed toolchains-sample-*.xml, 2.19.0 shifted to ./workflows/maven-toolchains.xml

...

version='[9, )' means the build process needs access to JDK >=9. You don't need to install JDK 9. Its possible to register a JDK version that satisfies the toolchain requirement, i.e. JDK 11, without having to make changes to machine's default JDK by using Toolchains. In addition to the sample toolchain files that ship with log4j (toolchains-dockerUp to release 2.18.0 log4j shipped with several toolchain files: toolchains-sample-linux.xml, toolchains-jenkinssample-ubuntumac.xml, toolchains-jenkinssample-win.xml, toolchains-sample-linux.xml, toolchains-sample-mac.xml, toolchains-sample-win.xml) here is a minimal JDK 11 example. In release 2.19.0 (LOG4J2-3573, LOG4J2-3520) those have files have been condensed/moved to a single file (./workflows/maven-toolchains.xml) that now relies on two environment variables:

Code Block
languagexml
titleMinimal JDK 11 Toolchains file for Windows./workflows/maven-toolchains.xml
collapsetrue
<toolchains>
  <toolchain>
    <type>jdk</type>
    <provides>
      <version>11</version><version>1.8</version>
    </provides>
    <configuration>
      <jdkHome>${env.JAVA_HOME_8_X64}</jdkHome>
    </configuration>
  </toolchain>
  <toolchain>
    <type>jdk</type>
  <vendor>sun</vendor>  <provides>
      <version>11</version>
    </provides>
    <configuration>
      <jdkHome>C:\Program Files\Java\jdk-11<<jdkHome>${env.JAVA_HOME_11_X64}</jdkHome>
    </configuration>
  </toolchain>
</toolchains>

Now Maven can be invoked using "mvn clean install -t toolchains-sample-win.xml" or the JDK 11 example can be copied to a new file and ran with "mvn clean install -t toolchains-jdk11-win./workflows/maven-toolchains.xml".

mvn apache-rat:check -DskipTests

This command runs the Release Audit Tool to verify files have the necessary license header. Sometimes a unit test flakes out (doesn't wait long enough to delete a temporary file) so the RAT check will fail. Try running the test suite again or deleting the temp file then RAT should succeed.

An alternative command is "mvn -P rat -DskipTests clean verify".

Verify content on staging website

A release manager will publish content from https://github.com/apache/logging-log4j-site/tree/asf-staging to https://logging.staged.apache.org/log4j. Verify the staged website is correct.

"mvn site -DskipTests

...

This command rebuilds " will build the website locally based on Markdown files in /src/site. Its the slowest verification and can take over an hour even on modern 2020/2021 hardware. It takes a long time because it generates documentation for all ~34 Log4j2 modules (jpa, docker, couchdb, etc). Managing the Logging Services Web Sites describes a technique for quickly generating the core files (articles.md, index.md.vm, security.md, etc) without all module HTML.

...