diff --git a/log4j-1.2-api/.log4j-plugin-processing-activator b/log4j-1.2-api/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-1.2-api/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +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 6e38bbee4e0..e53d42ddf67 100644 --- a/log4j-1.2-api/pom.xml +++ b/log4j-1.2-api/pom.xml @@ -16,17 +16,21 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j ${revision} ../log4j-parent + log4j-1.2-api jar Apache Log4j 1.x Compatibility API The Apache Log4j 1.x Compatibility API + ${basedir}/.. @@ -45,6 +49,7 @@ org.apache.logging.log4j.core + javax.jms @@ -127,21 +132,6 @@ - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - diff --git a/log4j-async-logger/.log4j-plugin-processing-activator b/log4j-async-logger/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-async-logger/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-async-logger/pom.xml b/log4j-async-logger/pom.xml index aba22bd83d9..c9f73798455 100644 --- a/log4j-async-logger/pom.xml +++ b/log4j-async-logger/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -66,21 +68,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - diff --git a/log4j-config-properties/.log4j-plugin-processing-activator b/log4j-config-properties/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-config-properties/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-config-properties/pom.xml b/log4j-config-properties/pom.xml index 35aa18e1a52..14a6a5691ce 100644 --- a/log4j-config-properties/pom.xml +++ b/log4j-config-properties/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -48,21 +50,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - diff --git a/log4j-config-yaml/.log4j-plugin-processing-activator b/log4j-config-yaml/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-config-yaml/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-config-yaml/pom.xml b/log4j-config-yaml/pom.xml index c09c0fa0b4f..8b02dd275d1 100644 --- a/log4j-config-yaml/pom.xml +++ b/log4j-config-yaml/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -48,21 +50,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - diff --git a/log4j-core-test/.log4j-plugin-processing-activator b/log4j-core-test/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-core-test/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +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 2bdec622f7b..e893432684f 100644 --- a/log4j-core-test/pom.xml +++ b/log4j-core-test/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -28,6 +30,7 @@ jar Apache Log4j Core Tests The Apache Log4j Implementation Tests + 9 @@ -58,6 +61,7 @@ spring.test;substitute="spring-test" + @@ -288,35 +292,10 @@ test + - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - default-testCompile - - - - -ApluginPackage=org.apache.logging.log4j.core.test2 - - - - - - org.apache.maven.plugins maven-failsafe-plugin @@ -344,6 +323,7 @@ + fast-test @@ -359,4 +339,5 @@ + diff --git a/log4j-core/.log4j-plugin-processing-activator b/log4j-core/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-core/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml index e676d00b879..66a444575ff 100644 --- a/log4j-core/pom.xml +++ b/log4j-core/pom.xml @@ -16,20 +16,27 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j ${revision} ../log4j-parent + log4j-core jar Apache Log4j Core The Apache Log4j Implementation + false + + true + @@ -62,7 +69,10 @@ jdk.unsupported;transitive=false, org.fusesource.jansi;transitive=false, + + ${log4j.docgen.pluginDescriptorsDir.phase1} + @@ -99,31 +109,5 @@ true - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - true - - - - diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/Layout.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/Layout.java index 1821103ad2a..62641d810e1 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/Layout.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/Layout.java @@ -24,7 +24,7 @@ /** * Converts {@link LogEvent} instances into different layouts of data. A layout typically encodes into either - * a {@link String} or {@code byte[]}. Since version 2.6, layouts implement {@link Encoder Encoder<LogEvent>} + * a {@link String} or {@code byte[]}. Since version 2.6, layouts implement {@link Encoder} * to support direct encoding of a log event into a {@link ByteBufferDestination} without creating temporary * intermediary objects. Since version 3.0.0, layouts no longer reference the legacy Java serialization API * and are limited to strings or bytes. diff --git a/log4j-csv/.log4j-plugin-processing-activator b/log4j-csv/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-csv/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-csv/pom.xml b/log4j-csv/pom.xml index 9556eb32a23..5c617c1b0bc 100644 --- a/log4j-csv/pom.xml +++ b/log4j-csv/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -27,6 +29,7 @@ log4j-csv Apache Log4j CSV Apache Log4j CSV Layout. + ${basedir}/.. @@ -92,21 +95,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - diff --git a/log4j-docker/.log4j-plugin-processing-activator b/log4j-docker/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-docker/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-docker/pom.xml b/log4j-docker/pom.xml index 890688836e3..2b6c19f09e2 100644 --- a/log4j-docker/pom.xml +++ b/log4j-docker/pom.xml @@ -16,17 +16,21 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j ${revision} ../log4j-parent + log4j-docker jar Apache Log4j Docker Library Apache Log4j Docker Support + + 4.0.0 + org.apache.logging.log4j log4j @@ -28,6 +30,7 @@ jar Apache Log4j Flume Bridge The Apache Log4j Flume Appender + ${basedir}/.. @@ -41,6 +44,7 @@ org.apache.logging.log4j.core + org.apache.logging.log4j @@ -115,21 +119,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - diff --git a/log4j-jdbc-dbcp2/.log4j-plugin-processing-activator b/log4j-jdbc-dbcp2/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-jdbc-dbcp2/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +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 ec67a8828e2..70882c37f0f 100644 --- a/log4j-jdbc-dbcp2/pom.xml +++ b/log4j-jdbc-dbcp2/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -27,6 +29,7 @@ log4j-jdbc-dbcp2 Apache Log4j JDBC DBCP 2 Connection source for the JDBC Appender using Apache Commons DBCP2. + + 4.0.0 + org.apache.logging.log4j log4j @@ -27,6 +29,7 @@ log4j-jdbc Apache Log4j JDBC Apache Log4j Java Database Connectivity (JDBC). + ${basedir}/.. @@ -115,20 +118,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - org.apache.maven.plugins maven-jar-plugin @@ -144,4 +133,5 @@ + diff --git a/log4j-jndi/.log4j-plugin-processing-activator b/log4j-jndi/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-jndi/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-jndi/pom.xml b/log4j-jndi/pom.xml index fe20c57a27d..2ac33183220 100644 --- a/log4j-jndi/pom.xml +++ b/log4j-jndi/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -28,10 +30,12 @@ jar Apache Log4j JNDI Support The Apache Log4j JNDI Support + ${basedir}/.. org.apache.logging.log4j.jndi + org.apache.logging.log4j @@ -43,21 +47,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - diff --git a/log4j-jul/pom.xml b/log4j-jul/pom.xml index 5fb2704a4c5..84b1f81dc1f 100644 --- a/log4j-jul/pom.xml +++ b/log4j-jul/pom.xml @@ -85,19 +85,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - org.apache.maven.plugins maven-surefire-plugin diff --git a/log4j-kubernetes/.log4j-plugin-processing-activator b/log4j-kubernetes/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-kubernetes/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-kubernetes/pom.xml b/log4j-kubernetes/pom.xml index 9162c079fd2..267dd6bd40b 100644 --- a/log4j-kubernetes/pom.xml +++ b/log4j-kubernetes/pom.xml @@ -16,17 +16,21 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j ${revision} ../log4j-parent + log4j-kubernetes jar Apache Log4j Kubernetes Library Apache Log4j Kubernetes Support + + 4.0.0 + org.apache.logging.log4j log4j @@ -38,99 +40,90 @@ + org.apache.logging.log4j log4j-layout-template-json + org.apache.logging.log4j log4j-1.2-api test + org.apache.logging.log4j log4j-config-properties test + org.apache.logging.log4j log4j-config-yaml test + org.apache.logging.log4j log4j-core-test test + org.assertj assertj-core test + org.awaitility awaitility test + org.elasticsearch.client elasticsearch-rest-high-level-client test + com.fasterxml.jackson.core jackson-databind test + com.google.code.java-allocation-instrumenter java-allocation-instrumenter test + org.junit.jupiter junit-jupiter-engine test + org.junit.jupiter junit-jupiter-params test + co.elastic.logging log4j2-ecs-layout test + - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - default-testCompile - - - - -ApluginPackage=org.apache.logging.log4j.layout.template.json.test - - - - - + org.apache.maven.plugins @@ -147,6 +140,7 @@ + org.apache.maven.plugins maven-surefire-plugin @@ -162,17 +156,29 @@ + + docker + false + + + 8.10.2 + + -Xms750m -Xmx750m + + + io.fabric8 docker-maven-plugin @@ -183,14 +189,13 @@ elasticsearch - docker.elastic.co/elasticsearch/elasticsearch:8.2.2 + elasticsearch:${elastic.version} - false single-node + false + ${elastic.java-opts} - 1000000000 - 9200:9200 @@ -211,7 +216,7 @@ logstash - docker.elastic.co/logstash/logstash:8.2.2 + logstash:${elastic.version} elasticsearch @@ -221,6 +226,9 @@ log4j-layout-template-json-network logstash + + ${elastic.java-opts} + 12222:12222 12345:12345 @@ -306,11 +314,11 @@ + org.apache.maven.plugins maven-failsafe-plugin - false **/*IT.java @@ -324,8 +332,10 @@ + + diff --git a/log4j-layout-template-json/.log4j-plugin-processing-activator b/log4j-layout-template-json/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-layout-template-json/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +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 866c8180fbd..e2682a71cfa 100644 --- a/log4j-layout-template-json/pom.xml +++ b/log4j-layout-template-json/pom.xml @@ -32,6 +32,10 @@ ${basedir}/.. + + true + @@ -40,55 +44,22 @@ + org.apache.logging.log4j log4j-api + org.apache.logging.log4j log4j-core + org.apache.logging.log4j log4j-plugins - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - + diff --git a/log4j-mongodb4/.log4j-plugin-processing-activator b/log4j-mongodb4/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-mongodb4/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-mongodb4/pom.xml b/log4j-mongodb4/pom.xml index 6292a1e3ff4..f92c2ab0c87 100644 --- a/log4j-mongodb4/pom.xml +++ b/log4j-mongodb4/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -27,8 +29,8 @@ log4j-mongodb4 Apache Log4j MongoDB 4 MongoDB appender for Log4j using the MongoDB 4 driver API. - + @@ -116,20 +118,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - org.apache.maven.plugins maven-surefire-plugin diff --git a/log4j-osgi-test/.log4j-plugin-processing-activator b/log4j-osgi-test/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-osgi-test/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +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 ad9fc96e194..20722f85427 100644 --- a/log4j-osgi-test/pom.xml +++ b/log4j-osgi-test/pom.xml @@ -16,17 +16,21 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j ${revision} ../log4j-parent + log4j-osgi-test jar Apache Log4j OSGi tests The Apache Log4j OSGi tests + org.apache.logging.log4j.osgi true @@ -37,6 +41,7 @@ true 1.3.7 + javax.inject @@ -136,7 +141,9 @@ test + + @@ -144,6 +151,7 @@ src/test/resources + + 4.0.0 + org.apache.logging.log4j log4j-bom @@ -1014,6 +1016,7 @@ + parallel-tests @@ -1028,6 +1031,118 @@ + + + + plugin-processing + + + + + .log4j-plugin-processing-activator + + + + + ${log4j.docgen.pluginDescriptorsDir.phase2} + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + generate-plugin-package-for-tests + + bsh-property + + process-test-resources + + + log4jPluginPackageForTests + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + org.apache.logging.log4j + log4j-docgen + ${log4j-docgen.version} + + + + org.apache.logging.log4j + log4j-plugin-processor + ${project.version} + + + + + -Alog4j.docgen.descriptorFilePath=${log4j.docgen.pluginDescriptorsDir.effective}/${project.artifactId}-plugins.xml + -Alog4j.docgen.groupId=${project.groupId} + -Alog4j.docgen.artifactId=${project.artifactId} + -Alog4j.docgen.version=${project.version} + -Alog4j.docgen.description=${project.description} + -Alog4j.docgen.typeFilter.excludePattern=${log4j.docgen.typeFilter.excludePattern} + + + + + + + default-testCompile + + + -ApluginPackage=${log4jPluginPackageForTests} + + + + + + + + + + + + diff --git a/log4j-plugin-processor/pom.xml b/log4j-plugin-processor/pom.xml index 4c205384413..26034033aa6 100644 --- a/log4j-plugin-processor/pom.xml +++ b/log4j-plugin-processor/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -28,17 +30,23 @@ jar Apache Log4j Plugin Processor Log4j Plugin Annotation Processor + ${basedir}/.. + + org.apache.logging.log4j log4j-api + org.apache.logging.log4j log4j-plugins + + diff --git a/log4j-plugins-test/.log4j-plugin-processing-activator b/log4j-plugins-test/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-plugins-test/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-plugins-test/pom.xml b/log4j-plugins-test/pom.xml index 6fce8958665..765cf1c8825 100644 --- a/log4j-plugins-test/pom.xml +++ b/log4j-plugins-test/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -28,9 +30,11 @@ jar Apache Log4j Plugins Test Log4j Plugin Test Support + ${basedir}/.. + org.apache.logging.log4j @@ -68,23 +72,10 @@ test + - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - org.apache.maven.plugins maven-failsafe-plugin @@ -103,6 +94,7 @@ + parallel-tests @@ -128,4 +120,5 @@ + diff --git a/log4j-script/.log4j-plugin-processing-activator b/log4j-script/.log4j-plugin-processing-activator new file mode 100644 index 00000000000..ba133f36961 --- /dev/null +++ b/log4j-script/.log4j-plugin-processing-activator @@ -0,0 +1 @@ +This file is here to activate the `plugin-processing` Maven profile. diff --git a/log4j-script/pom.xml b/log4j-script/pom.xml index a1c00afe195..afb43d33007 100644 --- a/log4j-script/pom.xml +++ b/log4j-script/pom.xml @@ -16,7 +16,9 @@ ~ limitations under the License. --> + 4.0.0 + org.apache.logging.log4j log4j @@ -111,21 +113,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - org.apache.logging.log4j - log4j-plugin-processor - ${project.version} - - - - - - diff --git a/log4j-script/src/main/java/org/apache/logging/log4j/script/appender/rolling/action/ScriptCondition.java b/log4j-script/src/main/java/org/apache/logging/log4j/script/appender/rolling/action/ScriptCondition.java index 373682397df..88006a9c341 100644 --- a/log4j-script/src/main/java/org/apache/logging/log4j/script/appender/rolling/action/ScriptCondition.java +++ b/log4j-script/src/main/java/org/apache/logging/log4j/script/appender/rolling/action/ScriptCondition.java @@ -92,8 +92,8 @@ public List selectFilesToDelete( *
  • pathList - a {@code java.util.List} containing {@link PathWithAttribute} objects. (The script is * free to modify and return this list.)
  • *
  • substitutor - a {@link StrSubstitutor} that can be used to look up variables embedded in the base - * dir or other properties - *
  • statusLogger - the {@link StatusLogger} that can be used to log events during script execution + * dir or other properties
  • + *
  • statusLogger - the {@link StatusLogger} that can be used to log events during script execution
  • *
  • any properties declared in the configuration
  • * * @param configuration the configuration diff --git a/pom.xml b/pom.xml index adb5cf93ecd..5dffdfa9955 100644 --- a/pom.xml +++ b/pom.xml @@ -331,18 +331,27 @@ ======================== --> - all,-missing,-html + 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: --> true - + all,-missing,-html + true true - - 0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?(0|[1-9]\d*)(-[a-zA-Z][0-9a-zA-Z-]*)?)$]]> + + 0.8.0 + + + + ^java\..+ + + ${maven.multiModuleProjectDirectory}/target/plugin-descriptors/phase1 + ${maven.multiModuleProjectDirectory}/target/plugin-descriptors/phase2
    @@ -603,6 +612,7 @@ **/rabbitmq.config **/MANIFEST.MF .surefire-* + **/.log4j-* @@ -682,6 +692,7 @@ org.apache.maven.plugins maven-resources-plugin + copy-site @@ -725,6 +737,7 @@ + copy-javadoc @@ -733,10 +746,10 @@ site - ${javadoc.skip} + ${maven.javadoc.skip} ${maven.multiModuleProjectDirectory}/target/site/javadoc/${project.artifactId} @@ -744,6 +757,7 @@ + @@ -769,9 +783,95 @@ + + + org.apache.logging.log4j + log4j-docgen-maven-plugin + ${log4j-docgen.version} + false + + + + + + + + ${log4j.docgen.pluginDescriptorsDir.phase1} + + + ${log4j.docgen.pluginDescriptorsDir.phase2} + + + + + + ${log4j.docgen.typeFilter.excludePattern} + + + + + + + + + + generate-plugin-docs + + generate-documentation + + pre-site + + ${project.basedir}/src/template/docgen + + index.adoc.ftl + ${project.build.directory}/generated-sources/site/asciidoc/plugin-reference.adoc + + + type.adoc.ftl + ${project.build.directory}/generated-sources/site/asciidoc/_plugin-reference/%g-%a-%c.adoc + + + + + + + generate-plugin-schema + + generate-schema + + pre-site + + ${project.version} + ${project.build.directory}/log4j-config.xsd + + + + + + + org.asciidoctor asciidoctor-maven-plugin + + 3.0.0 false @@ -779,6 +879,19 @@ spring-asciidoctor-extensions-block-switch 0.6.3 + + + org.asciidoctor + asciidoctorj + 3.0.0-alpha.2 + + + org.apache.logging.log4j + log4j-docgen-asciidoctor-extension + ${log4j-docgen.version} + @@ -793,11 +906,14 @@ target/site true - src/asciidoc/templates + src/template/asciidoctor rouge left + ${project.build.directory}/plugin-descriptors + ${log4j.docgen.typeFilter.excludePattern} + diff --git a/src/changelog/.3.x.x/add_plugin_reference.xml b/src/changelog/.3.x.x/add_plugin_reference.xml new file mode 100644 index 00000000000..47618da7334 --- /dev/null +++ b/src/changelog/.3.x.x/add_plugin_reference.xml @@ -0,0 +1,9 @@ + + + + Add _"Plugin Reference"_ to the website. +It is a Javadoc-on-steroids focusing on Log4j plugins. + diff --git a/src/site/asciidoc/plugin-reference.adoc b/src/site/asciidoc/plugin-reference.adoc new file mode 100644 index 00000000000..f41b0bbfbaa --- /dev/null +++ b/src/site/asciidoc/plugin-reference.adoc @@ -0,0 +1,22 @@ +// vim: set syn=markdown : + +//// +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. +//// += Plugin reference + +This file is a stub. +Its content will be auto-generated during build. diff --git a/src/asciidoc/templates/document.html.erb b/src/template/asciidoctor/document.html.erb similarity index 99% rename from src/asciidoc/templates/document.html.erb rename to src/template/asciidoctor/document.html.erb index 36d13b0bb8b..3f0e34d84d4 100644 --- a/src/asciidoc/templates/document.html.erb +++ b/src/template/asciidoctor/document.html.erb @@ -69,6 +69,7 @@
  • Old Docs
  • +
  • Plugin reference
  • Wiki
  • Articles
  • FAQ
  • diff --git a/src/template/docgen/index.adoc.ftl b/src/template/docgen/index.adoc.ftl new file mode 100644 index 00000000000..9dc1d8c733c --- /dev/null +++ b/src/template/docgen/index.adoc.ftl @@ -0,0 +1,59 @@ +<#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="lookup" type="org.apache.logging.log4j.docgen.generator.TypeLookup" --> + += Plugin reference + +This page is a Javadoc-on-steroids specialized for Log4j plugins. +This reference manual is derived from the source code of all Log4j plugins and types associated with them. +You can use this reference manual to precisely customize your `log4j2.xml`. + +[INFO] +==== +Every running Log4j system is a constellation of xref:../manual/plugins.adoc[plugins], which is analogous to beans in Java EE and Spring. +This not only allows Log4j itself to be developed in individual components, but also enables extensibility users can leverage. +==== + +[#shortcuts] +== Shortcuts + +* xref:#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-config-Configuration[The `` element assembly in a `log4j2.xml`] +* xref:#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-Appender[The type hierarchy of *appenders*] +* xref:#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-Layout[The type hierarchy of *layouts*] +* xref:#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-Filter[The type hierarchy of *filters*] + +[#index] +== Index + +Below is a list of all types reachable by plugins grouped by the Maven coordinate of the artifact bundling them. + +<#assign sourcedTypes = lookup?values/> +<#-- @ftlvariable name="sourcedTypes" type="org.apache.logging.log4j.docgen.generator.ArtifactSourcedType[]" --> +<#assign lastGroupId = ''/> +<#assign lastArtifactId = ''/> +<#list sourcedTypes?sort_by('artifactId', 'groupId', ['type', 'className']) as sourcedType> + <#if sourcedType.groupId != lastGroupId || sourcedType.artifactId != lastArtifactId> + <#assign lastGroupId = sourcedType.groupId/> + <#assign lastArtifactId = sourcedType.artifactId/> + +[#${sourcedType.groupId?replace('.', '-')}_${sourcedType.artifactId?replace('.', '-')}] +=== `${sourcedType.groupId}:${sourcedType.artifactId}` + + +include::_plugin-reference/${sourcedType.groupId}-${sourcedType.artifactId}-${sourcedType.type.className}.adoc[leveloffset=+4] + diff --git a/src/template/docgen/type.adoc.ftl b/src/template/docgen/type.adoc.ftl new file mode 100644 index 00000000000..48f8dc24781 --- /dev/null +++ b/src/template/docgen/type.adoc.ftl @@ -0,0 +1,133 @@ +<#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.Type" --> +<#-- @ftlvariable name="lookup" type="org.apache.logging.log4j.docgen.generator.TypeLookup" --> + +[#${sourcedType.groupId?replace('.', '-')}_${sourcedType.artifactId?replace('.', '-')}_${type.className?replace('.', '-')}] += ${type.name!('`' + type.className + '`')} + +Class:: `${type.className}` +Provider:: `${sourcedType.groupId}:${sourcedType.artifactId}` + +${(type.description.text)!} + +<#assign hasElements = ((type.elements?size)!0) != 0/> +<#if type.class.simpleName == 'PluginType'> + <#-- @ftlvariable name="type" type="org.apache.logging.log4j.docgen.PluginType" --> +[#${sourcedType.groupId?replace('.', '-')}_${sourcedType.artifactId?replace('.', '-')}_${type.className?replace('.', '-')}_XML-snippet] +== XML snippet +[source, xml] +---- + <#assign tag><${type.name} + <#assign indent = tag?replace('.', ' ', 'r')/> + <#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(hasElements?then('>', '/>'), '')} + <#else> +${indent}${attr.name}="${attr.defaultValue!}"${attr?is_last?then(hasElements?then('>', '/>'), '')} + + + <#if hasElements> + <#list type.elements as element> + <#assign multiplicitySuffix = (element.multiplicity == '*')?then('','')/> + <#assign elementName = 'a-' + element.type?keep_after_last('.') + '-implementation'/> + <#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> + <#assign elementName = element_type.name/> + + + <${elementName}/>${multiplicitySuffix} + + + + +---- + +<#if type.attributes?has_content> + +[#${sourcedType.groupId?replace('.', '-')}_${sourcedType.artifactId?replace('.', '-')}_${type.className?replace('.', '-')}-attributes] +== Attributes + +Optional attributes are denoted by `?`-suffixed types. + +[cols="1m,1m,1m,5"] +|=== +|Name|Type|Default|Description + + <#list type.attributes?sort_by('name') as attr> + <#assign requirementSuffix = attr.required?then('', '?')/> +|${attr.name} + <#assign attrTypeName = attr.type?contains('.')?then(attr.type?keep_after_last('.'), attr.type)/> + <#if lookup[attr.type]??> + <#assign attrSourcedType = lookup[attr.type]/> +|xref:#${attrSourcedType.groupId?replace('.', '-')}_${attrSourcedType.artifactId?replace('.', '-')}_${attr.type?replace('.', '-')}[${attrTypeName}]${requirementSuffix} + <#else> +|${attrTypeName}${requirementSuffix} + +|${attr.defaultValue!} +a|${(attr.description.text)!} + + +|=== + +<#if hasElements> + +[#${sourcedType.groupId?replace('.', '-')}_${sourcedType.artifactId?replace('.', '-')}_${type.className?replace('.', '-')}_components] +== Nested components + +Optional components are denoted by `?`-suffixed types. + +[cols="1m,1m,5"] +|=== +|Tag|Type|Description + + <#list type.elements?sort_by('type') as element> + <#assign requirementSuffix = element.required?then('', '?')/> + <#assign descriptionCell = (element.description.text)!/> + <#assign elementName = element.type?contains('.')?then(element.type?keep_after_last('.'), element.type)/> + <#if lookup[element.type]??> + <#assign elementSourcedType = lookup[element.type]/> + <#assign tagCell = elementSourcedType.type.name!/> +|${tagCell} +|xref:#${elementSourcedType.groupId?replace('.', '-')}_${elementSourcedType.artifactId?replace('.', '-')}_${element.type?replace('.', '-')}[${elementName}]${requirementSuffix} + <#else> +| +|${elementName}${requirementSuffix} + +a|${descriptionCell} + + +|=== + +<#if type.implementations?has_content> + +[#${sourcedType.groupId?replace('.', '-')}_${sourcedType.artifactId?replace('.', '-')}_${type.className?replace('.', '-')}_implementations] +== Known implementations + + <#list type.implementations as impl> + <#assign implSourcedType = lookup[impl]/> +* xref:#${implSourcedType.groupId?replace('.', '-')}_${implSourcedType.artifactId?replace('.', '-')}_${impl?replace('.', '-')}[${impl?contains('.')?then(impl?keep_after_last('.'), impl)}] + +