You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2024/02/29 16:16:49 UTC
(logging-log4j2) 02/02: Revert "Merge remote-tracking branch 'origin/2.x' into 2.x-docgen"
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 8ff0f18768728cc7dff6460053b8fe74299b8159
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Feb 29 17:12:23 2024 +0100
Revert "Merge remote-tracking branch 'origin/2.x' into 2.x-docgen"
This reverts commit c8d60bc535907d1969d08649319a1e27eb473dd2, reversing
changes made to af045db99eb0e811e4d9000fd422255c7a9592b2.
---
log4j-1.2-api/.log4j-plugin-processing-activator | 1 -
log4j-1.2-api/pom.xml | 28 +++-
log4j-cassandra/.log4j-plugin-processing-activator | 1 -
log4j-cassandra/pom.xml | 26 ++-
log4j-core-java9/pom.xml | 2 -
log4j-core-test/.log4j-plugin-processing-activator | 1 -
log4j-core-test/pom.xml | 20 ++-
log4j-core/pom.xml | 72 ++------
.../appender/rolling/action/ScriptCondition.java | 4 +-
log4j-couchdb/.log4j-plugin-processing-activator | 1 -
log4j-couchdb/pom.xml | 26 ++-
log4j-docker/.log4j-plugin-processing-activator | 1 -
log4j-docker/pom.xml | 32 +++-
log4j-flume-ng/.log4j-plugin-processing-activator | 1 -
log4j-flume-ng/pom.xml | 29 +++-
.../.log4j-plugin-processing-activator | 1 -
log4j-jakarta-web/pom.xml | 26 ++-
.../.log4j-plugin-processing-activator | 1 -
log4j-jdbc-dbcp2/pom.xml | 26 ++-
log4j-jpa/.log4j-plugin-processing-activator | 1 -
log4j-jpa/pom.xml | 25 ++-
log4j-kubernetes/pom.xml | 29 +++-
log4j-layout-template-json-test/pom.xml | 17 +-
.../.log4j-plugin-processing-activator | 1 -
log4j-layout-template-json/pom.xml | 40 ++++-
log4j-mongodb3/.log4j-plugin-processing-activator | 1 -
log4j-mongodb3/pom.xml | 23 ++-
log4j-mongodb4/.log4j-plugin-processing-activator | 1 -
log4j-mongodb4/pom.xml | 23 ++-
log4j-osgi-test/.log4j-plugin-processing-activator | 1 -
log4j-osgi-test/pom.xml | 29 +++-
log4j-parent/pom.xml | 81 ---------
.../.log4j-plugin-processing-activator | 1 -
log4j-spring-boot/pom.xml | 29 +++-
log4j-web/pom.xml | 27 ++-
pom.xml | 186 ---------------------
src/docgen-templates/interface.adoc.ftl | 39 -----
src/docgen-templates/license.adoc.ftl | 16 --
src/docgen-templates/plugin.adoc.ftl | 115 -------------
src/docgen-templates/scalars.adoc.ftl | 45 -----
src/site/resources/plugin-reference.html | 26 ---
src/site/site.xml | 2 -
42 files changed, 392 insertions(+), 665 deletions(-)
diff --git a/log4j-1.2-api/.log4j-plugin-processing-activator b/log4j-1.2-api/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-1.2-api/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml
index b9f286d49a..58c18dd5bc 100644
--- a/log4j-1.2-api/pom.xml
+++ b/log4j-1.2-api/pom.xml
@@ -16,21 +16,17 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
-
<artifactId>log4j-1.2-api</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j 1.x Compatibility API</name>
<description>The Apache Log4j 1.x Compatibility API</description>
-
<properties>
<module.name>org.apache.log4j</module.name>
@@ -49,7 +45,6 @@
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
<!-- we have an `bnd.bnd` file to override the parent's defaults -->
</properties>
-
<dependencies>
<!-- Used for JMS appenders (needs an implementation of course) -->
<dependency>
@@ -143,6 +138,27 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+
+ <!-- Enable Log4j plugin processing -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
<profiles>
<!-- Fixes incompatible with Java 8 -->
diff --git a/log4j-cassandra/.log4j-plugin-processing-activator b/log4j-cassandra/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-cassandra/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-cassandra/pom.xml b/log4j-cassandra/pom.xml
index a248ca734b..f0ae5007f2 100644
--- a/log4j-cassandra/pom.xml
+++ b/log4j-cassandra/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,10 +25,8 @@
</parent>
<artifactId>log4j-cassandra</artifactId>
-
<name>Apache Log4j Cassandra</name>
<description>Cassandra appender for Log4j.</description>
-
<properties>
<!--
@@ -112,4 +108,26 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-core-java9/pom.xml b/log4j-core-java9/pom.xml
index bf1d9dc9ea..6b6c0e0b25 100644
--- a/log4j-core-java9/pom.xml
+++ b/log4j-core-java9/pom.xml
@@ -30,8 +30,6 @@
<properties>
<maven.compiler.release>9</maven.compiler.release>
<maven.deploy.skip>true</maven.deploy.skip>
- <maven.install.skip>true</maven.install.skip>
- <sign.skip>true</sign.skip>
</properties>
<dependencies>
<!-- Naturally, all implementations require the log4j-api JAR -->
diff --git a/log4j-core-test/.log4j-plugin-processing-activator b/log4j-core-test/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-core-test/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml
index ac718f0e72..1155ed9989 100644
--- a/log4j-core-test/pom.xml
+++ b/log4j-core-test/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,10 +25,9 @@
</parent>
<artifactId>log4j-core-test</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Core Tests</name>
<description>The Apache Log4j Implementation Tests</description>
-
<properties>
<!-- Ignore less important (high rank) bugs for test artifacts -->
<spotbugs.maxRank>9</spotbugs.maxRank>
@@ -354,6 +351,21 @@
<build>
<plugins>
+ <!-- Enable Log4j plugin processing -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index 0f51b1e488..4fa7392c89 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -16,28 +16,20 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
-
<artifactId>log4j-core</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Core</name>
<description>The Apache Log4j Implementation</description>
-
<properties>
-
<javadoc.skip>false</javadoc.skip>
- <!-- Tests are located elsewhere, no need to do any processing for the `src/test` directory: -->
- <maven.test.skip>true</maven.test.skip>
-
<!--
~ OSGi and JPMS options
-->
@@ -90,7 +82,6 @@
javax.mail.api;substitute="javax.mail-api";transitive=false;static=true
</bnd-extra-module-options>
</properties>
-
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
@@ -209,7 +200,6 @@
<optional>true</optional>
</dependency>
</dependencies>
-
<build>
<plugins>
@@ -217,8 +207,6 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
-
- <!-- Add Java 9+ code for the MRJ -->
<execution>
<id>add-source</id>
<goals>
@@ -231,74 +219,36 @@
</sources>
</configuration>
</execution>
-
- <!-- Attach the generated `log4j-plugins.xml` -->
- <execution>
- <id>attach-plugin-descriptor</id>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/log4j-plugins.xml</file>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
-
</executions>
</plugin>
- <!-- We can't use `plugin-processing` Maven profile activated by `.log4j-plugin-processing-activator` file, because...
- `log4j-core` contains `PluginProcessor`, that is responsible for generating `META-INF/org/apache/.../Log4j2Plugins.dat` from `@Plugin`-annotated members.
- `log4j-core` also contains `@Plugin`-annotated members too.
- That is, we need `log4j-core` to build `log4j-core`.
- To work around this chicken-and-egg problem, we build as follows:
-
- 1. Compile sources using the `default-compile` default compilation execution.
- This will generate the `PluginProcessor` class.
-
- 2. Make a second compilation pass using the generated `PluginProcessor`. -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths combine.self="override" />
+ </configuration>
<executions>
-
- <!-- Compile sources as usual -->
<execution>
+ <!-- disable annotation processing for first pass -->
<id>default-compile</id>
<configuration>
- <annotationProcessorPaths combine.children="append">
- <!-- `org.apache.logging.log4j.docgen.processor.DescriptorGenerator` for generating `log4j-plugins.xml`: -->
+ <annotationProcessorPaths>
<path>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-docgen</artifactId>
- <version>${log4j-docgen.version}</version>
+ <groupId>com.google.errorprone</groupId>
+ <artifactId>error_prone_core</artifactId>
+ <version>${error-prone.version}</version>
</path>
</annotationProcessorPaths>
- <compilerArgs combine.children="append">
- <!-- Provide `org.apache.logging.log4j.docgen.processor.DescriptorGenerator` arguments: -->
- <arg>-Alog4j.docgen.descriptorFilePath=${project.build.directory}/log4j-plugins.xml</arg>
- <arg>-Alog4j.docgen.groupId=${project.groupId}</arg>
- <arg>-Alog4j.docgen.artifactId=${project.artifactId}</arg>
- <arg>-Alog4j.docgen.version=${project.version}</arg>
- <arg>-Alog4j.docgen.description=${project.description}</arg>
- </compilerArgs>
</configuration>
</execution>
-
- <!-- Process sources using `PluginProcessor` to generate `META-INF/org/apache/.../Log4j2Plugins.dat` -->
<execution>
+ <!-- then do a processing-only pass to generate plugins .dat file -->
<id>process-plugins</id>
<goals>
<goal>compile</goal>
</goals>
<phase>process-classes</phase>
<configuration>
- <annotationProcessorPaths combine.self="override" />
<annotationProcessors>
<processor>org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor</processor>
</annotationProcessors>
@@ -306,7 +256,6 @@
<proc>only</proc>
</configuration>
</execution>
-
</executions>
</plugin>
@@ -342,5 +291,4 @@
</plugins>
</build>
-
</project>
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ScriptCondition.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ScriptCondition.java
index 3519980c2a..87e439a5f2 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ScriptCondition.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ScriptCondition.java
@@ -89,8 +89,8 @@ public class ScriptCondition {
* <li>pathList - a {@code java.util.List} containing {@link org.apache.logging.log4j.core.appender.rolling.action.PathWithAttributes} objects. (The script is
* free to modify and return this list.)</li>
* <li>substitutor - a {@link org.apache.logging.log4j.core.lookup.StrSubstitutor} that can be used to look up variables embedded in the base
- * dir or other properties</li>
- * <li>statusLogger - the {@link StatusLogger} that can be used to log events during script execution</li>
+ * dir or other properties
+ * <li>statusLogger - the {@link StatusLogger} that can be used to log events during script execution
* <li>any properties declared in the configuration</li>
* </ul>
* @param configuration the configuration
diff --git a/log4j-couchdb/.log4j-plugin-processing-activator b/log4j-couchdb/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-couchdb/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-couchdb/pom.xml b/log4j-couchdb/pom.xml
index 63ce30aaf4..ac65c693e0 100644
--- a/log4j-couchdb/pom.xml
+++ b/log4j-couchdb/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,10 +25,8 @@
</parent>
<artifactId>log4j-couchdb</artifactId>
-
<name>Apache Log4j CouchDB</name>
<description>CouchDB appender for Log4j.</description>
-
<properties>
<!--
@@ -85,4 +81,26 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-docker/.log4j-plugin-processing-activator b/log4j-docker/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-docker/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-docker/pom.xml b/log4j-docker/pom.xml
index 2b6bb357dc..7682421d2b 100644
--- a/log4j-docker/pom.xml
+++ b/log4j-docker/pom.xml
@@ -16,21 +16,17 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
-
<artifactId>log4j-docker</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Docker Library</name>
<description>Apache Log4j Docker Support</description>
-
<properties>
<!--
@@ -38,7 +34,6 @@
-->
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
</properties>
-
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
@@ -68,4 +63,29 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
</project>
diff --git a/log4j-flume-ng/.log4j-plugin-processing-activator b/log4j-flume-ng/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-flume-ng/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-flume-ng/pom.xml b/log4j-flume-ng/pom.xml
index 6af2f7c517..c3bffe0ec5 100644
--- a/log4j-flume-ng/pom.xml
+++ b/log4j-flume-ng/pom.xml
@@ -16,21 +16,17 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
-
<artifactId>log4j-flume-ng</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Flume Bridge</name>
<description>The Apache Log4j Flume Appender</description>
-
<properties>
<!--
@@ -43,7 +39,6 @@
</bnd-extra-module-options>
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
</properties>
-
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
@@ -118,4 +113,26 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-jakarta-web/.log4j-plugin-processing-activator b/log4j-jakarta-web/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-jakarta-web/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-jakarta-web/pom.xml b/log4j-jakarta-web/pom.xml
index f3434f9f85..a3f81e5146 100644
--- a/log4j-jakarta-web/pom.xml
+++ b/log4j-jakarta-web/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,7 +25,7 @@
</parent>
<artifactId>log4j-jakarta-web</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Jakarta Web</name>
<description>The Apache Log4j support for Jakarta EE 9+ web servlet containers</description>
@@ -81,4 +79,26 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-jdbc-dbcp2/.log4j-plugin-processing-activator b/log4j-jdbc-dbcp2/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-jdbc-dbcp2/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-jdbc-dbcp2/pom.xml b/log4j-jdbc-dbcp2/pom.xml
index 95522b7c1f..50196e3cc9 100644
--- a/log4j-jdbc-dbcp2/pom.xml
+++ b/log4j-jdbc-dbcp2/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,10 +25,8 @@
</parent>
<artifactId>log4j-jdbc-dbcp2</artifactId>
-
<name>Apache Log4j JDBC DBCP 2</name>
<description>Connection source for the JDBC Appender using Apache Commons DBCP2.</description>
-
<properties>
<!--
@@ -77,4 +73,26 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-jpa/.log4j-plugin-processing-activator b/log4j-jpa/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-jpa/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-jpa/pom.xml b/log4j-jpa/pom.xml
index b2c873b12a..e90cd50e2a 100644
--- a/log4j-jpa/pom.xml
+++ b/log4j-jpa/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,10 +25,8 @@
</parent>
<artifactId>log4j-jpa</artifactId>
-
<name>Apache Log4j JPA</name>
<description>Apache Log4j Java Persistence API Appender.</description>
-
<properties>
<!--
@@ -97,6 +93,27 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+
+ <!-- Enable Log4j plugin processing -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
<profiles>
<!-- Fixes incompatible with Java 8 -->
diff --git a/log4j-kubernetes/pom.xml b/log4j-kubernetes/pom.xml
index 359f9ef483..47313c6b12 100644
--- a/log4j-kubernetes/pom.xml
+++ b/log4j-kubernetes/pom.xml
@@ -16,21 +16,17 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
-
<artifactId>log4j-kubernetes</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Kubernetes Library</name>
<description>Apache Log4j Kubernetes Support</description>
-
<properties>
<!--
@@ -43,7 +39,6 @@
</bnd-extra-module-options>
<Fragment-Host>org.apache.logging.log4j.core</Fragment-Host>
</properties>
-
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
@@ -70,4 +65,26 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-layout-template-json-test/pom.xml b/log4j-layout-template-json-test/pom.xml
index 20c9d9d155..30b1dac1f8 100644
--- a/log4j-layout-template-json-test/pom.xml
+++ b/log4j-layout-template-json-test/pom.xml
@@ -27,13 +27,11 @@
</parent>
<artifactId>log4j-layout-template-json-test</artifactId>
-
<name>Apache Log4j JSON Template Layout tests</name>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
- <maven.install.skip>true</maven.install.skip>
<sign.skip>true</sign.skip>
<!--
@@ -128,6 +126,21 @@
<build>
<plugins>
+ <!-- Modules that contain `log4j-core` plugins, must be compiled with: `org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor` -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
<!-- Disable ITs, which are Docker-dependent, by default. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/log4j-layout-template-json/.log4j-plugin-processing-activator b/log4j-layout-template-json/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-layout-template-json/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-layout-template-json/pom.xml b/log4j-layout-template-json/pom.xml
index 9b1351fae3..369d38d7ff 100644
--- a/log4j-layout-template-json/pom.xml
+++ b/log4j-layout-template-json/pom.xml
@@ -27,7 +27,6 @@
</parent>
<artifactId>log4j-layout-template-json</artifactId>
-
<name>Apache Log4j JSON Template Layout</name>
<description>Apache Log4j Layout for producing JSON output that is structured according to a user-provided template.</description>
@@ -64,4 +63,43 @@
</dependencies>
+ <build>
+ <plugins>
+
+ <!-- Modules that contain `log4j-core` plugins, must be compiled with: `org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor` -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
+ <!-- Disable Failsafe, tests are in the `-test` module. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+
+ <!-- Disable Surefire, tests are in the `-test` module. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
</project>
diff --git a/log4j-mongodb3/.log4j-plugin-processing-activator b/log4j-mongodb3/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-mongodb3/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-mongodb3/pom.xml b/log4j-mongodb3/pom.xml
index e5e285b017..94fd94dc3e 100644
--- a/log4j-mongodb3/pom.xml
+++ b/log4j-mongodb3/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,10 +25,8 @@
</parent>
<artifactId>log4j-mongodb3</artifactId>
-
<name>Apache Log4j MongoDB 3</name>
<description>MongoDB appender for Log4j using the MongoDB 3 driver API.</description>
-
<properties>
<!--
@@ -150,6 +146,25 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
diff --git a/log4j-mongodb4/.log4j-plugin-processing-activator b/log4j-mongodb4/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-mongodb4/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-mongodb4/pom.xml b/log4j-mongodb4/pom.xml
index da17281813..098f1f76af 100644
--- a/log4j-mongodb4/pom.xml
+++ b/log4j-mongodb4/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,10 +25,8 @@
</parent>
<artifactId>log4j-mongodb4</artifactId>
-
<name>Apache Log4j MongoDB 4</name>
<description>MongoDB appender for Log4j using the MongoDB 4 driver API.</description>
-
<properties>
<!--
@@ -112,6 +108,25 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
diff --git a/log4j-osgi-test/.log4j-plugin-processing-activator b/log4j-osgi-test/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-osgi-test/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-osgi-test/pom.xml b/log4j-osgi-test/pom.xml
index 19dcd37e65..7f8b52961e 100644
--- a/log4j-osgi-test/pom.xml
+++ b/log4j-osgi-test/pom.xml
@@ -16,21 +16,17 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
-
<artifactId>log4j-osgi-test</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j OSGi tests</name>
<description>The Apache Log4j OSGi tests</description>
-
<properties>
<module.name>org.apache.logging.log4j.osgi</module.name>
<bnd.baseline.skip>true</bnd.baseline.skip>
@@ -41,7 +37,6 @@
<spotbugs.skip>true</spotbugs.skip>
<spifly.version>1.3.7</spifly.version>
</properties>
-
<dependencies>
<dependency>
<groupId>javax.inject</groupId>
@@ -140,9 +135,7 @@
<scope>test</scope>
</dependency>
</dependencies>
-
<build>
-
<testResources>
<testResource>
<!-- Enable variable interpolation in resources -->
@@ -150,7 +143,6 @@
<directory>src/test/resources</directory>
</testResource>
</testResources>
-
<plugins>
<!--
@@ -188,6 +180,25 @@
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index a21f19bd71..d276e4a617 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -1196,85 +1196,4 @@
</plugins>
</build>
- <profiles>
-
- <!-- `plugin-processing` profile containing configuration specific to `@Plugin`-annotated members -->
- <profile>
-
- <id>plugin-processing</id>
-
- <!-- Profile gets activated using a file instead of, say, a property.
- Since a Maven property lookup requires model interpolation and that hasn't happened at this stage yet.
- See: https://maven.apache.org/ref/3.9.6/maven-model-builder -->
- <activation>
- <file>
- <exists>.log4j-plugin-processing-activator</exists>
- </file>
- </activation>
-
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <annotationProcessorPaths combine.children="append">
- <!-- Include `org.apache.logging.log4j.docgen.processor.DescriptorGenerator` that generates `log4j-plugins.xml`.
- `DescriptorGenerator` must precede `PluginProcessor`, since the latter *claims* the `@Plugin`.
- Once claimed, `javac` doesn't pass those sources to other processors. -->
- <path>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-docgen</artifactId>
- <version>${log4j-docgen.version}</version>
- </path>
- <!-- `org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor` for generating `META-INF/org/apache/.../Log4j2Plugins.dat`: -->
- <path>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${project.version}</version>
- </path>
- </annotationProcessorPaths>
- <compilerArgs combine.children="append">
- <!-- Provide `org.apache.logging.log4j.docgen.processor.DescriptorGenerator` arguments: -->
- <arg>-Alog4j.docgen.descriptorFilePath=${project.build.directory}/log4j-plugins.xml</arg>
- <arg>-Alog4j.docgen.groupId=${project.groupId}</arg>
- <arg>-Alog4j.docgen.artifactId=${project.artifactId}</arg>
- <arg>-Alog4j.docgen.version=${project.version}</arg>
- <arg>-Alog4j.docgen.description=${project.description}</arg>
- </compilerArgs>
- </configuration>
- </plugin>
-
- <!-- Attach the generated `log4j-plugins.xml` -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-plugin-descriptor</id>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/log4j-plugins.xml</file>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
- </profile>
-
- </profiles>
-
</project>
diff --git a/log4j-spring-boot/.log4j-plugin-processing-activator b/log4j-spring-boot/.log4j-plugin-processing-activator
deleted file mode 100644
index ba133f3696..0000000000
--- a/log4j-spring-boot/.log4j-plugin-processing-activator
+++ /dev/null
@@ -1 +0,0 @@
-This file is here to activate the `plugin-processing` Maven profile.
diff --git a/log4j-spring-boot/pom.xml b/log4j-spring-boot/pom.xml
index 08d2aaf3ba..342489bbb4 100644
--- a/log4j-spring-boot/pom.xml
+++ b/log4j-spring-boot/pom.xml
@@ -16,22 +16,19 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
<version>${revision}</version>
<relativePath>../log4j-parent</relativePath>
</parent>
-
<artifactId>log4j-spring-boot</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Spring Boot Support</name>
<description>Apache Log4j Spring Boot Support</description>
-
<properties>
+
<!--
~ OSGi and JPMS options
-->
@@ -123,4 +120,26 @@
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml
index aa8b482ef9..287cd9a583 100644
--- a/log4j-web/pom.xml
+++ b/log4j-web/pom.xml
@@ -16,9 +16,7 @@
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
@@ -27,7 +25,7 @@
</parent>
<artifactId>log4j-web</artifactId>
-
+ <packaging>jar</packaging>
<name>Apache Log4j Web</name>
<description>The Apache Log4j support for web servlet containers</description>
@@ -90,4 +88,27 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!--
+ ~ Modules that contain `log4j-core` plugins, must be compiled with:
+ ~
+ ~ org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
+ -->
+ <annotationProcessorPaths combine.children="append">
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${project.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git a/pom.xml b/pom.xml
index ce70851308..1056c418dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -333,12 +333,6 @@
<maven.site.skip>true</maven.site.skip>
<maven.site.deploy.skip>true</maven.site.deploy.skip>
- <!-- Dependency versions -->
- <log4j-docgen.version>0.8.0-SNAPSHOT</log4j-docgen.version>
-
- <!-- Versions of libraries whose plugin descriptors will be documented: -->
- <docgen.log4j.version>2.23.0-SNAPSHOT</docgen.log4j.version>
-
</properties>
<dependencyManagement>
@@ -574,7 +568,6 @@
<exclude>**/rabbitmq.config</exclude>
<exclude>**/MANIFEST.MF</exclude>
<exclude>.surefire-*</exclude>
- <exclude>**/.log4j-*</exclude>
</excludes>
</configuration>
</plugin>
@@ -742,185 +735,6 @@
</executions>
</plugin>
- <!-- Download plugin descriptors -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>download-plugin-descriptors</id>
- <goals>
- <goal>copy</goal>
- </goals>
- <phase>pre-site</phase>
- <inherited>false</inherited>
- <configuration>
- <outputDirectory>${project.build.directory}/plugin-descriptors</outputDirectory>
- <artifactItems>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-1.2-api</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-cassandra</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-couchdb</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-docker</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-flume-ng</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-jakarta-web</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-jdbc-dbcp2</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-jpa</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-layout-template-json</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-mongodb3</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-mongodb4</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- <artifactItem>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-spring-boot</artifactId>
- <version>${docgen.log4j.version}</version>
- <type>xml</type>
- <classifier>log4j-plugins</classifier>
- </artifactItem>
-
- </artifactItems>
- </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>
- <executions>
- <execution>
- <id>generate-plugin-docs</id>
- <goals>
- <goal>generate-documentation</goal>
- </goals>
- <phase>pre-site</phase>
- <configuration>
- <descriptorFileMatchers>
- <descriptorFileMatcher>
- <baseDirectory>${project.build.directory}/plugin-descriptors</baseDirectory>
- <pathPatterns>glob:**/*.xml</pathPatterns>
- </descriptorFileMatcher>
- </descriptorFileMatchers>
- <templateDirectory>${project.basedir}/src/docgen-templates</templateDirectory>
- <scalarsTemplate>
- <source>scalars.adoc.ftl</source>
- <target>${project.build.directory}/generated-sources/site/asciidoc/plugin-reference/scalars.adoc</target>
- </scalarsTemplate>
- <interfaceTemplate>
- <source>interface.adoc.ftl</source>
- <target>${project.build.directory}/generated-sources/site/asciidoc/plugin-reference/%g/%a/%c.adoc</target>
- </interfaceTemplate>
- <pluginTemplate>
- <source>plugin.adoc.ftl</source>
- <target>${project.build.directory}/generated-sources/site/asciidoc/plugin-reference/%g/%a/%c.adoc</target>
- </pluginTemplate>
- </configuration>
- </execution>
- <execution>
- <id>generate-plugin-schema</id>
- <goals>
- <goal>generate-schema</goal>
- </goals>
- <phase>pre-site</phase>
- <configuration>
- <descriptorFileMatchers>
- <descriptorFileMatcher>
- <baseDirectory>${project.build.directory}/plugin-descriptors</baseDirectory>
- <pathPatterns>glob:**/*.xml</pathPatterns>
- </descriptorFileMatcher>
- </descriptorFileMatchers>
- <schemaFile>${project.build.directory}/generated-sources/site/resources/config.xsd</schemaFile>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
diff --git a/src/docgen-templates/interface.adoc.ftl b/src/docgen-templates/interface.adoc.ftl
deleted file mode 100644
index 53020979e8..0000000000
--- a/src/docgen-templates/interface.adoc.ftl
+++ /dev/null
@@ -1,39 +0,0 @@
-<#ftl output_format="plainText" strip_whitespace=true>
-<#--
- 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
-
- https://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.
--->
-<#-- @ftlvariable name="sourcedType" type="org.apache.logging.log4j.docgen.model.ArtifactSourcedType" -->
-<#assign type = sourcedType.type/>
-<#-- @ftlvariable name="type" type="org.apache.logging.log4j.docgen.model.AbstractType" -->
-<#-- @ftlvariable name="lookup" type="org.apache.logging.log4j.docgen.generator.TypeLookup" -->
-<#include "license.adoc.ftl">
-[#${type.className?replace('.', '_')}]
-= ${type.className?keep_after_last('.')}
-
-Class:: `${type.className}`
-<#if sourcedType.groupId?has_content && sourcedType.artifactId?has_content>
-Provider:: `${sourcedType.groupId}:${sourcedType.artifactId}`
-
-</#if><#if type.description??>
-${type.description.text}
-</#if>
-
-[#${type.className?replace('.', '_')}-implementations]
-== Known implementations
-
-<#list type.implementations as impl>
-* xref:${impl}.adoc[${impl?contains('.')?then(impl?keep_after_last('.'), impl)}]
-</#list>
diff --git a/src/docgen-templates/license.adoc.ftl b/src/docgen-templates/license.adoc.ftl
deleted file mode 100644
index 797f7c9fb7..0000000000
--- a/src/docgen-templates/license.adoc.ftl
+++ /dev/null
@@ -1,16 +0,0 @@
-////
-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
-
- https://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.
-////
diff --git a/src/docgen-templates/plugin.adoc.ftl b/src/docgen-templates/plugin.adoc.ftl
deleted file mode 100644
index f7d54b461d..0000000000
--- a/src/docgen-templates/plugin.adoc.ftl
+++ /dev/null
@@ -1,115 +0,0 @@
-<#ftl output_format="plainText" strip_whitespace=true>
-<#--
- 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
-
- https://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.
--->
-<#-- @ftlvariable name="sourcedType" type="org.apache.logging.log4j.docgen.model.ArtifactSourcedType" -->
-<#assign type = sourcedType.type/>
-<#-- @ftlvariable name="type" type="org.apache.logging.log4j.docgen.PluginType" -->
-<#-- @ftlvariable name="lookup" type="org.apache.logging.log4j.docgen.generator.TypeLookup" -->
-<#include "license.adoc.ftl">
-[#${type.className?replace('.', '_')}]
-= ${type.name}
-
-Class:: `${type.className}`
-<#if sourcedType.groupId?has_content && sourcedType.artifactId?has_content>
-Provider:: `${sourcedType.groupId}:${sourcedType.artifactId}`
-
-</#if>${(type.description.text)!'N/A'}
-
-[#${type.className?replace('.', '_')}-XML-snippet]
-== XML snippet
-[source, xml]
-----
-<#assign tag><${type.name} </#assign>
-<#assign indent = tag?replace('.', ' ', 'r')/>
-<#assign has_elements = type.elements?size != 0/>
-<#if !type.attributes?has_content>
-<${type.name}/>
- <#else>
- <#list type.attributes?sort_by('name') as attr>
- <#if attr?is_first>
-${tag}${attr.name}="${attr.defaultValue!}"${attr?is_last?then(has_elements?then('>', '/>'), '')}
- <#else>
-${indent}${attr.name}="${attr.defaultValue!}"${attr?is_last?then(has_elements?then('>', '/>'), '')}
- </#if>
- </#list>
- <#if has_elements>
- <#list type.elements as element>
- <#if lookup[element.type]??>
- <#assign element_type = lookup[element.type].type/>
- <#-- @ftlvariable name="element_type" type="org.apache.logging.log4j.docgen.model.AbstractType" -->
- <#if element_type.name?? && !element_type.implementations?has_content>
- <#-- @ftlvariable name="element_type" type="org.apache.logging.log4j.docgen.model.PluginType" -->
- <${element_type.name}/>
- <#else>
- <a-${element.type?keep_after_last('.')}-implementation/><#if element.multiplicity == '*'><!-- multiple occurrences allowed --></#if>
- </#if>
- </#if>
- </#list>
-</${type.name}>
- </#if>
-</#if>
-----
-<#if type.attributes?has_content>
-
-[#${type.className?replace('.', '_')}-attributes]
-== Attributes
-
-Required attributes are in **bold face**.
-
-[cols="1m,1m,1m,5"]
-|===
-|Name|Type|Default|Description
-
- <#list type.attributes?sort_by('name') as attr>
-|${attr.required?then('**', '')}${attr.name}${attr.required?then('**', '')}
-|xref:../../scalars.adoc#${attr.type?replace('.', '_')}[${attr.type?contains('.')?then(attr.type?keep_after_last('.'), attr.type)}]
-|${attr.defaultValue!}
-a|${(attr.description.text)!'N/A'}
-
- </#list>
-|===
-</#if>
-<#if has_elements>
-
-[#${type.className?replace('.', '_')}-components]
-== Nested components
-
-Required components are in **bold face**.
-
-[cols="1m,1m,5"]
-|===
-|Tag|Type|Description
-
- <#list type.elements?sort_by('type') as element>
- <#if lookup[element.type]??>
-|${element.required?then('**', '') + (lookup[element.type].type.name!'N/A') + element.required?then('**', '')}
-|xref:${element.type}.adoc[${element.type?contains('.')?then(element.type?keep_after_last('.'), element.type)}]
-a|${(element.description.text)!'N/A'}
-
- </#if>
- </#list>
-|===
-</#if>
-<#if type.implementations?has_content>
-
-[#${type.className?replace('.', '_')}-implementations]
-== Known implementations
-
- <#list type.implementations as impl>
-* xref:${impl}.adoc[${impl?contains('.')?then(impl?keep_after_last('.'), impl)}]
- </#list>
-</#if>
diff --git a/src/docgen-templates/scalars.adoc.ftl b/src/docgen-templates/scalars.adoc.ftl
deleted file mode 100644
index cb581261cc..0000000000
--- a/src/docgen-templates/scalars.adoc.ftl
+++ /dev/null
@@ -1,45 +0,0 @@
-<#ftl output_format="plainText" strip_whitespace=true>
-<#--
-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
-
-https://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.
--->
-<#-- @ftlvariable name="sourcedTypes" type="org.apache.logging.log4j.docgen.generator.ArtifactSourcedType[]" -->
-<#include "license.adoc.ftl">
-[#type-converters]
-= Type converters
-
-Type converter plugins are used to convert simple `String` values into other types.
-<#list sourcedTypes as sourcedType>
-<#assign scalar = sourcedType.type/>
-<#-- @ftlvariable name="scalar" type="org.apache.logging.log4j.docgen.model.ScalarType" -->
-
-[#${scalar.className?replace('.', '_')}]
-== `${scalar.className}`
-
- <#if sourcedType.groupId?has_content && sourcedType.artifactId?has_content>
-Provider:: `${sourcedType.groupId}:${sourcedType.artifactId}`
- </#if>
-
-${scalar.description.text}
- <#if scalar.values?size != 0>
-
-[#${scalar.className?replace('.', '_')}-values]
-=== Possible values
-
- <#list scalar.values as value>
-`${value.name}`:: ${(value.description.text)!'N/A'}
- </#list>
- </#if>
-</#list>
diff --git a/src/site/resources/plugin-reference.html b/src/site/resources/plugin-reference.html
deleted file mode 100644
index 12c3ecac6e..0000000000
--- a/src/site/resources/plugin-reference.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html lang="en">
-<head>
- <title>Apache Log4j Plugin Reference</title>
- <meta http-equiv="refresh" content="0; url=plugin-reference/org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.config.Configuration.html"/>
-</head>
-<body>
-<p>You will be redirected to <a href="plugin-reference/org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.config.Configuration.html">the <code>org.apache.logging.log4j.core.config.Configuration</code> reference</a>.</p>
-</body>
-</html>
diff --git a/src/site/site.xml b/src/site/site.xml
index f8882530f6..75c89e075e 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -277,8 +277,6 @@
<item name="Developer Notes" href="/manual/plugins.html#DeveloperNotes"/>
</item>
- <item name="Plugin reference" href="/plugin-reference.html"/>
-
<item name="Programmatic Log4j Configuration" href="/manual/customconfig.html" collapse="true">
<item name="ConfigurationBuilder API" href="/manual/customconfig.html#ConfigurationBuilder"/>
<item name="Understanding ConfigurationFactory" href="/manual/customconfig.html#ConfigurationFactory"/>