<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to you under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" child.project.url.inherit.append.path="false" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">

  <!-- ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
       ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
       ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
       ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
        ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██

       Log4j project modules should use `log4j-parent` as their parents, not this POM!
       This POM constitutes the BOM to be imported by applications using Log4j project modules. -->

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.logging</groupId>
    <artifactId>logging-parent</artifactId>
    <version>12.1.1</version>
    <relativePath />
  </parent>

  <groupId>org.apache.logging.log4j</groupId>
  <artifactId>log4j-bom</artifactId>
  <version>${revision}</version>
  <packaging>pom</packaging>

  <name>Apache Log4j BOM</name>
  <description>Apache Log4j Bill-of-Materials</description>
  <url>https://logging.apache.org/log4j/2.x/</url>

  <inceptionYear>1999</inceptionYear>

  <developers>

    <developer>
      <id>rgoers</id>
      <name>Ralph Goers</name>
      <email>rgoers@apache.org</email>
      <organization>Nextiva</organization>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/Phoenix</timezone>
    </developer>

    <developer>
      <id>ggregory</id>
      <name>Gary Gregory</name>
      <email>ggregory@apache.org</email>
      <url>https://www.garygregory.com</url>
      <organization>The Apache Software Foundation</organization>
      <organizationUrl>https://www.apache.org/</organizationUrl>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>

    <developer>
      <id>sdeboy</id>
      <name>Scott Deboy</name>
      <email>sdeboy@apache.org</email>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/Los_Angeles</timezone>
    </developer>

    <developer>
      <id>rpopma</id>
      <name>Remko Popma</name>
      <email>rpopma@apache.org</email>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>Asia/Tokyo</timezone>
    </developer>

    <developer>
      <id>nickwilliams</id>
      <name>Nick Williams</name>
      <email>nickwilliams@apache.org</email>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/Chicago</timezone>
    </developer>

    <developer>
      <id>mattsicker</id>
      <name>Matt Sicker</name>
      <email>mattsicker@apache.org</email>
      <organization>Apple</organization>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/Chicago</timezone>
    </developer>

    <developer>
      <id>bbrouwer</id>
      <name>Bruce Brouwer</name>
      <email>bruce.brouwer@gmail.com</email>
      <roles>
        <role>Committer</role>
      </roles>
      <timezone>America/Detroit</timezone>
    </developer>

    <developer>
      <id>rgupta</id>
      <name>Raman Gupta</name>
      <email>rgupta@apache.org</email>
      <roles>
        <role>Committer</role>
      </roles>
      <timezone>America/New York</timezone>
    </developer>

    <developer>
      <id>mikes</id>
      <name>Mikael Ståldal</name>
      <email>mikes@apache.org</email>
      <organization>Spotify</organization>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>Europe/Stockholm</timezone>
    </developer>

    <developer>
      <id>ckozak</id>
      <name>Carter Kozak</name>
      <email>ckozak@apache.org</email>
      <url>https://github.com/carterkozak</url>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/New York</timezone>
    </developer>

    <developer>
      <id>vy</id>
      <name>Volkan Yazıcı</name>
      <email>vy@apache.org</email>
      <roles>
        <role>PMC Chair</role>
      </roles>
      <timezone>Europe/Amsterdam</timezone>
    </developer>

    <developer>
      <id>rgrabowski</id>
      <name>Ron Grabowski</name>
      <email>rgrabowski@apache.org</email>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>America/New_York</timezone>
    </developer>

    <developer>
      <id>pkarwasz</id>
      <name>Piotr P. Karwasz</name>
      <email>pkarwasz@apache.org</email>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>Europe/Warsaw</timezone>
    </developer>

    <developer>
      <id>grobmeier</id>
      <name>Christian Grobmeier</name>
      <email>grobmeier@apache.org</email>
      <roles>
        <role>PMC Member</role>
      </roles>
      <timezone>Europe/Berlin</timezone>
    </developer>

  </developers>

  <mailingLists>

    <mailingList>
      <name>log4j-user</name>
      <subscribe>log4j-user-subscribe@logging.apache.org</subscribe>
      <unsubscribe>log4j-user-unsubscribe@logging.apache.org</unsubscribe>
      <post>log4j-user@logging.apache.org</post>
      <archive>https://lists.apache.org/list.html?log4j-user@logging.apache.org</archive>
    </mailingList>

    <mailingList>
      <name>dev</name>
      <subscribe>dev-subscribe@logging.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@logging.apache.org</unsubscribe>
      <post>dev@logging.apache.org</post>
      <archive>https://lists.apache.org/list.html?dev@logging.apache.org</archive>
    </mailingList>

    <mailingList>
      <name>security</name>
      <subscribe>security-subscribe@logging.apache.org</subscribe>
      <unsubscribe>security-unsubscribe@logging.apache.org</unsubscribe>
      <post>security@logging.apache.org</post>
      <archive>https://lists.apache.org/list.html?security@logging.apache.org</archive>
    </mailingList>

  </mailingLists>

  <modules>

    <!-- the parent POM must come first: -->
    <module>log4j-parent</module>

    <!-- Next unpublished, but internally and *implicitly* (e.g., as a plugin dependency) consumed modules in alphabetical order: -->
    <module>log4j-api-java9</module>
    <module>log4j-core-java9</module>

    <!-- Last comes the rest of the modules in alphabetical order.
         Note that modules here must have a corresponding entry in `dependencyManagement > dependencies` block below! -->
    <module>log4j-1.2-api</module>
    <module>log4j-api</module>
    <module>log4j-api-test</module>
    <module>log4j-appserver</module>
    <module>log4j-cassandra</module>
    <module>log4j-core</module>
    <module>log4j-core-fuzz-test</module>
    <module>log4j-core-its</module>
    <module>log4j-core-test</module>
    <module>log4j-couchdb</module>
    <module>log4j-docker</module>
    <module>log4j-fuzz-test</module>
    <module>log4j-iostreams</module>
    <module>log4j-jakarta-jms</module>
    <module>log4j-jakarta-smtp</module>
    <module>log4j-jakarta-web</module>
    <module>log4j-jcl</module>
    <module>log4j-jpa</module>
    <module>log4j-jpl</module>
    <module>log4j-jdbc-dbcp2</module>
    <module>log4j-jul</module>
    <module>log4j-layout-template-json</module>
    <module>log4j-layout-template-json-fuzz-test</module>
    <module>log4j-layout-template-json-test</module>
    <module>log4j-mongodb</module>
    <module>log4j-mongodb4</module>
    <module>log4j-osgi-test</module>
    <module>log4j-perf-test</module>
    <module>log4j-slf4j-impl</module>
    <module>log4j-slf4j2-impl</module>
    <module>log4j-slf4j2-impl-fuzz-test</module>
    <module>log4j-spring-boot</module>
    <module>log4j-spring-cloud-config-client</module>
    <module>log4j-taglib</module>
    <module>log4j-to-slf4j</module>
    <module>log4j-to-jul</module>
    <module>log4j-web</module>

  </modules>

  <scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
    <connection>scm:git:https://github.com/apache/logging-log4j2.git</connection>
    <developerConnection>scm:git:https://github.com/apache/logging-log4j2.git</developerConnection>
    <tag>rel/2.25.3</tag>
    <url>https://github.com/apache/logging-log4j2</url>
  </scm>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/apache/logging-log4j2/issues</url>
  </issueManagement>

  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/apache/logging-log4j2/actions</url>
  </ciManagement>

  <distributionManagement>
    <!-- `site` is only included to make `maven-site-plugin` stop complaining: -->
    <site>
      <id>www.example.com</id>
      <url>scp://www.example.com/www/docs/project/</url>
    </site>
    <downloadUrl>https://logging.apache.org/log4j/2.x/download.html</downloadUrl>
    <!-- `repository` from ASF parent POM (id: apache.releases.https) -->
    <!-- `snapshotRepository` from ASF parent POM (id: apache.snapshots.https) -->
  </distributionManagement>

  <properties>

    <!-- project version -->
    <revision>2.26.1</revision>
    <!-- Versions used on the site: no snapshots! -->
    <site-log4j-api.version>2.26.1</site-log4j-api.version>
    <site-log4j-core.version>2.26.1</site-log4j-core.version>
    <site-log4j-layout-template-json.version>2.26.1</site-log4j-layout-template-json.version>

    <!-- =================
         Common properties
         ================= -->
    <module.name />

    <!-- `project.build.outputTimestamp` is required to be present for reproducible builds.
         We actually inherit one from the `org.apache:apache` through our parent `org.apache.logging:logging-parent`.
         Though inheriting this property has two undesired consequences:
         1. `artifact:compare` dumps an `ERROR` log stating that this `property should not be inherited but defined` (apache/logging-parent#50)
         2. This value is employed in various places while creating the distribution
         To mitigate these, we define a *dummy* value here and let the CI replace it during a release.
         Hence, *DO NOT MANUALLY EDIT THIS VALUE*! -->
    <project.build.outputTimestamp>2026-06-29T07:01:45Z</project.build.outputTimestamp>

    <!-- ========================
         Site-specific properties
         ======================== -->
    <!-- `maven-javadoc-plugin` is only used to generate Javadoc HTML used in the website.
         We don't deploy any Javadoc JARs.
         We also don't generate Javadoc HTML for all modules, but only for two modules: `log4j-api` and `log4j-core`.
         Hence, we disable it by default: -->
    <maven.javadoc.skip>true</maven.javadoc.skip>
    <doclint>all,-missing,-html</doclint>
    <!-- Skipping `maven-site-plugin` globally. -->
    <maven.site.skip>true</maven.site.skip>
    <maven.site.deploy.skip>true</maven.site.deploy.skip>
    <site-commons-compress.version>1.27.1</site-commons-compress.version>
    <site-commons-csv.version>1.14.0</site-commons-csv.version>
    <site-commons-logging.version>1.3.5</site-commons-logging.version>
    <site-conversant.version>1.2.21</site-conversant.version>
    <site-disruptor.version>4.0.0</site-disruptor.version>
    <site-flume.version>1.11.0</site-flume.version>
    <site-jackson.version>2.19.2</site-jackson.version>
    <site-javax-mail.version>1.6.2</site-javax-mail.version>
    <site-jctools.version>4.0.5</site-jctools.version>
    <site-je.version>18.3.12</site-je.version>
    <site-jeromq.version>0.6.0</site-jeromq.version>
    <site-kafka.version>3.9.1</site-kafka.version>
    <site-logback.version>1.3.15</site-logback.version>
    <site-slf4j.version>2.0.17</site-slf4j.version>

    <!-- =====================================================
         Direct dependency version properties (in alphabetical order)
         ===================================================== -->
    <log4j-docgen.version>0.9.0</log4j-docgen.version>
    <node.version>21.7.1</node.version>
    <npm.version>10.5.0</npm.version>

    <!-- ==================================
         `log4j-docgen`-specific properties
         ================================== -->
    <!-- `log4j-docgen` qualified class name exclude pattern -->
    <log4j.docgen.typeFilter.excludePattern>^java\..+</log4j.docgen.typeFilter.excludePattern>
    <!-- Directories where `log4j-docgen` annotation processor will emit files to -->
    <log4j.docgen.pluginDescriptorsDir.phase1>${maven.multiModuleProjectDirectory}/target/plugin-descriptors/phase1</log4j.docgen.pluginDescriptorsDir.phase1>
    <log4j.docgen.pluginDescriptorsDir.phase2>${maven.multiModuleProjectDirectory}/target/plugin-descriptors/phase2</log4j.docgen.pluginDescriptorsDir.phase2>

  </properties>

  <dependencyManagement>
    <dependencies>

      <!-- List of managed dependencies (in alphabetical order) that are intended for public consumption.
           Modules that are not used anywhere (e.g., `log4j-core-its`, `log4j-osgi-test`) should not be placed here.
           Modules that are used only internally (e.g., `log4j-layout-template-json-test`) should be added to `dependencyManagement > dependencies` in `log4j-parent/pom.xml`. -->

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-1.2-api</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api-test</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-appserver</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-cassandra</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core-test</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-couchdb</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-docker</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-flume-ng</artifactId>
        <version>2.23.1</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-iostreams</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-jakarta-jms</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-jakarta-smtp</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-jakarta-web</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-jcl</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-jpa</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-jpl</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-jul</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-layout-template-json</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-mongodb4</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-mongodb</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-slf4j2-impl</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-slf4j-impl</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-spring-boot</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-spring-cloud-config-client</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-taglib</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-to-jul</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-to-slf4j</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-web</artifactId>
        <version>${project.version}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>

    <plugins>

      <!-- Apache RAT (Release Audit Tool) check to verify licenses.
           `apache-rat-plugin`: https://creadur.apache.org/rat/apache-rat-plugin/
           Release Audit Tool: https://creadur.apache.org/rat/index.html -->
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.16.1</version>
        <configuration>
          <consoleOutput>true</consoleOutput>
          <excludes combine.children="append">
            <!-- Matches other RAT configurations in this POM -->
            <exclude>src/main/resources/META-INF/services/**/*</exclude>
            <exclude>src/test/resources/**/*</exclude>
            <!-- IDE settings imports -->
            <exclude>src/ide/**</exclude>
            <!-- Font Awesome License (Font: SIL OFL 1.1, CSS: MIT License)-->
            <exclude>src/site/resources/font-awesome-4.7.0/css/font-awesome.css</exclude>
            <exclude>src/site/resources/font-awesome-4.7.0/css/font-awesome.min.css</exclude>
            <exclude>src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.svg</exclude>
            <!-- Generated files -->
            <exclude>**/.toDelete</exclude>
            <exclude>velocity.log</exclude>
            <!-- Other -->
            <exclude>**/README.md</exclude>
            <exclude>SECURITY.md</exclude>
            <exclude>**/*.yml</exclude>
            <exclude>**/*.yaml</exclude>
            <exclude>**/*.json</exclude>
            <excllude>**/images/*.drawio</excllude>
            <exclude>**/fluent-bit.conf</exclude>
            <exclude>**/rabbitmq.config</exclude>
            <exclude>**/MANIFEST.MF</exclude>
            <exclude>.surefire-*</exclude>
            <exclude>**/.log4j-*</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkCount>1C</forkCount>
          <reuseForks>false</reuseForks>
          <runOrder>random</runOrder>
          <systemPropertyVariables>
            <java.awt.headless>true</java.awt.headless>
          </systemPropertyVariables>
        </configuration>
      </plugin>

      <!--
        ~ Adds Antora examples to the list of checked files
        -->
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <configuration>
          <java>
            <includes>
              <include>src/main/java/**/*.java</include>
              <include>src/test/java/**/*.java</include>
              <include>src/site/antora/modules/ROOT/examples/**/*.java</include>
            </includes>
          </java>
        </configuration>
      </plugin>

      <!-- ███████ ████████  █████  ██████  ████████        ███████ ██ ████████ ███████
           ██         ██    ██   ██ ██   ██    ██    ██     ██      ██    ██    ██
           ███████    ██    ███████ ██████     ██           ███████ ██    ██    █████
                ██    ██    ██   ██ ██   ██    ██    ██          ██ ██    ██    ██
           ███████    ██    ██   ██ ██   ██    ██           ███████ ██    ██    ███████

           This section consists of plugins responsible for generating the site.
           Note that only this (i.e., the root) module is supposed to have a `site` goal, it is skipped for all other modules! -->

      <!-- Define `currentYear` property used by the `maven-javadoc-plugin` configuration -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>define-currentYear-property</id>
            <goals>
              <goal>timestamp-property</goal>
            </goals>
            <phase>pre-site</phase>
            <inherited>false</inherited>
            <configuration>
              <name>currentYear</name>
              <pattern>yyyy</pattern>
              <locale>en_US</locale>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-site-javadoc</id>
            <goals>
              <goal>javadoc-no-fork</goal>
            </goals>
            <phase>pre-site</phase>
            <!-- This execution must be inherited and enabled by modules publishing javadocs: `-api` and `-core`.
                 Such modules enable this execution via `maven.javadoc.skip` property.
                 Hence, don't insert a `<inherited>false</inherited>`, please! -->
            <configuration combine.self="override">
              <!-- `notimestamp` avoids `diff` noise and is required for reproducible builds: https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
              <notimestamp>true</notimestamp>
              <skip>${maven.javadoc.skip}</skip>
              <legacyMode>true</legacyMode>
              <bottom><![CDATA[<p align="center">
              Copyright &copy; {inceptionYear}-{currentYear} {organizationName}.
              All Rights Reserved.<br/>
              Apache, Log4j, and the Apache feather logo are trademarks or registered trademarks of {organizationName}.
              Oracle and Java are registered trademarks of Oracle and/or its affiliates.
              Other names may be trademarks of their respective owners.
            </p>]]></bottom>
              <offlineLinks>
                <link>
                  <url>https://logging.apache.org/log4j/2.x/javadoc/log4j-api</url>
                  <location>${maven.multiModuleProjectDirectory}/log4j-api/target/reports/apidocs/</location>
                </link>
                <link>
                  <url>https://logging.apache.org/log4j/2.x/javadoc/log4j-core</url>
                  <location>${maven.multiModuleProjectDirectory}/log4j-core/target/reports/apidocs/</location>
                </link>
              </offlineLinks>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>

        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>

        <!-- These are dummy dependencies!
             They are not used anywhere while running `maven-resources-plugin`.
             `filter-antora-yml` execution above injects these `*.version` properties into `antora.yml`.
             Later on, we use them in the manual while referencing to Maven artifacts with their versions.
             We need these `<dependency>` entries to trick `dependabot` to update the version properties automatically.
             No, we cannot use `${project.version}`, because it is not released yet. -->
        <dependencies>

          <!-- Other dependencies -->

          <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>${site-commons-compress.version}</version>
          </dependency>

          <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>${site-commons-csv.version}</version>
          </dependency>

          <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>${site-commons-logging.version}</version>
          </dependency>

          <dependency>
            <groupId>com.conversantmedia</groupId>
            <artifactId>disruptor</artifactId>
            <version>${site-conversant.version}</version>
          </dependency>

          <dependency>
            <groupId>com.lmax</groupId>
            <artifactId>disruptor</artifactId>
            <version>${site-disruptor.version}</version>
          </dependency>

          <dependency>
            <groupId>org.apache.flume</groupId>
            <artifactId>flume-ng-embedded-agent</artifactId>
            <version>${site-flume.version}</version>
          </dependency>

          <dependency>
            <groupId>com.fasterxml.jackson</groupId>
            <artifactId>jackson-bom</artifactId>
            <version>${site-jackson.version}</version>
            <type>pom</type>
          </dependency>

          <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>${site-javax-mail.version}</version>
          </dependency>

          <dependency>
            <groupId>org.jctools</groupId>
            <artifactId>jctools-core</artifactId>
            <version>${site-jctools.version}</version>
          </dependency>

          <dependency>
            <groupId>com.sleepycat</groupId>
            <artifactId>je</artifactId>
            <version>${site-je.version}</version>
          </dependency>

          <dependency>
            <groupId>org.zeromq</groupId>
            <artifactId>jeromq</artifactId>
            <version>${site-jeromq.version}</version>
          </dependency>

          <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>${site-kafka.version}</version>
          </dependency>

          <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${site-logback.version}</version>
          </dependency>

          <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${site-slf4j.version}</version>
          </dependency>

        </dependencies>

        <executions>

          <!-- Process `target/antora-yml` and output to `target/generated-site/antora` -->
          <execution>
            <id>filter-antora-yml</id>
          </execution>

          <!-- Copy `src/site` to `target/generated-site` -->
          <execution>
            <id>copy-site</id>
          </execution>

          <!-- Copy `target/site/apidocs` to the root module's `target/site/javadoc/<artifactId>` folder -->
          <execution>
            <id>copy-javadoc</id>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <phase>site</phase>
            <!-- This execution must be inherited and enabled by modules publishing javadocs: `-api` and `-core`.
                 Such modules enable this execution via `maven.javadoc.skip` property.
                 Hence, don't insert a `<inherited>false</inherited>`, please! -->
            <configuration>
              <skip>${maven.javadoc.skip}</skip>
              <outputDirectory>${maven.multiModuleProjectDirectory}/target/site/javadoc/${project.artifactId}</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.build.directory}/reports/apidocs</directory>
                </resource>
              </resources>
            </configuration>
          </execution>

          <!-- Copies the static resources in `src/site/resources` directly to `target/site`.
               These resources are not handled by Antora. -->
          <execution>
            <id>copy-site-resources</id>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <phase>site</phase>
            <configuration>
              <resources>
                <resource>
                  <directory>src/site/resources</directory>
                </resource>
              </resources>
              <outputDirectory>target/site</outputDirectory>
            </configuration>
          </execution>

        </executions>

      </plugin>

      <plugin>

        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-docgen-maven-plugin</artifactId>
        <version>${log4j-docgen.version}</version>
        <inherited>false</inherited>

        <!-- Common docgen configuration -->
        <configuration>

          <!-- Descriptor processing order matters!

               Imagine we place all descriptors to the same folder.
               Assume that the filesystem walks folder contents in alphanumeric order.
               Sourcing `log4j-docgen:generate-*` from that folder will consume descriptors in the following order:

               1. `log4j-1.2.api`
               2. `log4j-cassandra`
               3. `log4j-core`
               4. ...

               For instance, `AbstractFilterable` is defined by the descriptors of both `log4j-cassandra` and `log4j-core`.
               Due to alphanumeric scanning order, it will appear as it is provided by `log4j-cassandra`.
               Though, it is actually provided by `log4j-core`.
               To avoid this problem, we place descriptors to folders associated with phases.
               We pass the folder of each phase in a certain order to `log4j-docgen:generate-*`. -->
          <descriptorFileMatchers>
            <descriptorFileMatcher>
              <baseDirectory>${log4j.docgen.pluginDescriptorsDir.phase1}</baseDirectory>
            </descriptorFileMatcher>
            <descriptorFileMatcher>
              <baseDirectory>${log4j.docgen.pluginDescriptorsDir.phase2}</baseDirectory>
            </descriptorFileMatcher>
          </descriptorFileMatchers>

          <typeFilter>
            <excludes>
              <exclude>${log4j.docgen.typeFilter.excludePattern}</exclude>
            </excludes>
          </typeFilter>

        </configuration>

        <executions>

          <!-- Generate AsciiDoc from downloaded plugin descriptors -->
          <execution>
            <id>generate-plugin-docs</id>
            <goals>
              <goal>generate-documentation</goal>
            </goals>
            <phase>pre-site</phase>
            <configuration>
              <templateDirectory>${project.basedir}/src/docgen</templateDirectory>
              <indexTemplates>
                <template>
                  <source>index.adoc.ftl</source>
                  <target>${project.build.directory}/generated-site/antora/modules/ROOT/pages/plugin-reference.adoc</target>
                </template>
              </indexTemplates>
              <typeTemplates>
                <template>
                  <source>type.adoc.ftl</source>
                  <target>${project.build.directory}/generated-site/antora/modules/ROOT/pages/_plugin-reference/%g-%a-%c.adoc</target>
                </template>
              </typeTemplates>
            </configuration>
          </execution>

          <!-- Generate XSD from downloaded plugin descriptors -->
          <execution>
            <id>generate-plugin-schema</id>
            <goals>
              <goal>generate-schema</goal>
            </goals>
            <phase>site</phase>
            <configuration>
              <schemaVersion>${project.version}</schemaVersion>
              <schemaFile>${project.build.directory}/log4j-config.xsd</schemaFile>
            </configuration>
          </execution>

        </executions>

      </plugin>

      <!-- ███████ ███    ██ ██████         ███████ ██ ████████ ███████
           ██      ████   ██ ██   ██ ██     ██      ██    ██    ██
           █████   ██ ██  ██ ██   ██        ███████ ██    ██    █████
           ██      ██  ██ ██ ██   ██ ██          ██ ██    ██    ██
           ███████ ██   ████ ██████         ███████ ██    ██    ███████ -->

    </plugins>

  </build>

  <profiles>

    <profile>
      <id>rerun-tests</id>
      <activation>
        <property>
          <name>env.CI</name>
          <value>true</value>
        </property>
      </activation>
      <properties>
        <surefire.rerunFailingTestsCount>2</surefire.rerunFailingTestsCount>
      </properties>
    </profile>

    <profile>
      <id>sequential-tests</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <forkCount>1</forkCount>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>rewrite</id>

      <properties>
        <skipTests>true</skipTests>
      </properties>

      <build>
        <defaultGoal>clean package rewrite:runNoFork spotless:apply</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.openrewrite.maven</groupId>
            <artifactId>rewrite-maven-plugin</artifactId>
            <version>6.0.1</version>
            <configuration>
              <activeRecipes>
                <activeRecipe>org.openrewrite.java.logging.log4j.ParameterizedLogging</activeRecipe>
              </activeRecipes>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.openrewrite.recipe</groupId>
                <artifactId>rewrite-migrate-java</artifactId>
                <version>3.0.0</version>
              </dependency>
              <dependency>
                <groupId>org.openrewrite.recipe</groupId>
                <artifactId>rewrite-logging-frameworks</artifactId>
                <version>3.2.0</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>
