This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new fb77cea  Remove annotation process from initial compiles
fb77cea is described below

commit fb77ceabaa02110c7c8cfee8625ded88303f2b73
Author: Ralph Goers <[email protected]>
AuthorDate: Tue Dec 28 20:36:04 2021 -0700

    Remove annotation process from initial compiles
---
 log4j-api/pom.xml                                  | 53 ++++++++++++++++++++++
 log4j-core-test/pom.xml                            |  2 +-
 log4j-plugins/pom.xml                              | 53 ++++++++++++++++++++++
 log4j-plugins/src/main/java/module-info.java       |  2 -
 .../plugins/convert/plugins/Log4jPlugins.java      | 36 +++++++++++++++
 ...e.logging.log4j.plugins.processor.PluginService |  1 +
 6 files changed, 144 insertions(+), 3 deletions(-)

diff --git a/log4j-api/pom.xml b/log4j-api/pom.xml
index 522297b..9e75c15 100644
--- a/log4j-api/pom.xml
+++ b/log4j-api/pom.xml
@@ -96,6 +96,59 @@
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${compiler.plugin.version}</version>
+        <executions>
+          <execution>
+            <id>default-compile</id>
+            <configuration>
+              <source>${maven.compiler.source}</source>
+              <target>${maven.compiler.target}</target>
+              <release>${maven.compiler.release}</release>
+              <showDeprecation>true</showDeprecation>
+              <showWarnings>true</showWarnings>
+              <verbose>false</verbose>
+              <encoding>UTF-8</encoding>
+              <fork>true</fork>
+              <meminitial>256</meminitial>
+              <maxmem>1024</maxmem>
+              <compilerArgs>
+                <arg>-XDcompilePolicy=simple</arg>
+                <arg>-Xplugin:ErrorProne</arg>
+                <!--
+                https://errorprone.info/docs/installation
+                in Java 16+, https://openjdk.java.net/jeps/396 encapsulates 
internals that errorprone needs
+                -->
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
+                
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
+                
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
+              </compilerArgs>
+              <compilerArguments>
+                <Xmaxwarns>10000</Xmaxwarns>
+                <Xlint />
+              </compilerArguments>
+              <annotationProcessorPaths>
+                <path>
+                  <groupId>com.google.errorprone</groupId>
+                  <artifactId>error_prone_core</artifactId>
+                  <version>${errorprone.version}</version>
+                </path>
+              </annotationProcessorPaths>
+              <forceJavacCompilerUse>true</forceJavacCompilerUse>
+              <parameters>true</parameters>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <executions>
           <execution>
diff --git a/log4j-core-test/pom.xml b/log4j-core-test/pom.xml
index 7479025..a580e32 100644
--- a/log4j-core-test/pom.xml
+++ b/log4j-core-test/pom.xml
@@ -30,7 +30,7 @@
   <properties>
     <log4jParentDir>${basedir}/..</log4jParentDir>
     <docLabel>Core Documentation</docLabel>
-    <projectDir>/core</projectDir>
+    <projectDir>/log4j-core-test</projectDir>
     <log4j2-logstash-layout.version>0.18</log4j2-logstash-layout.version>
     <maven.doap.skip>true</maven.doap.skip>
     <graalvm.version>21.3.0</graalvm.version>
diff --git a/log4j-plugins/pom.xml b/log4j-plugins/pom.xml
index bd3d579..bb2df7f 100644
--- a/log4j-plugins/pom.xml
+++ b/log4j-plugins/pom.xml
@@ -77,6 +77,59 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${compiler.plugin.version}</version>
+        <executions>
+          <execution>
+            <id>default-compile</id>
+            <configuration>
+              <source>${maven.compiler.source}</source>
+              <target>${maven.compiler.target}</target>
+              <release>${maven.compiler.release}</release>
+              <showDeprecation>true</showDeprecation>
+              <showWarnings>true</showWarnings>
+              <verbose>false</verbose>
+              <encoding>UTF-8</encoding>
+              <fork>true</fork>
+              <meminitial>256</meminitial>
+              <maxmem>1024</maxmem>
+              <compilerArgs>
+                <arg>-XDcompilePolicy=simple</arg>
+                <arg>-Xplugin:ErrorProne</arg>
+                <!--
+                https://errorprone.info/docs/installation
+                in Java 16+, https://openjdk.java.net/jeps/396 encapsulates 
internals that errorprone needs
+                -->
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
+                
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
+                
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
+                
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
+              </compilerArgs>
+              <compilerArguments>
+                <Xmaxwarns>10000</Xmaxwarns>
+                <Xlint />
+              </compilerArguments>
+              <annotationProcessorPaths>
+                <path>
+                  <groupId>com.google.errorprone</groupId>
+                  <artifactId>error_prone_core</artifactId>
+                  <version>${errorprone.version}</version>
+                </path>
+              </annotationProcessorPaths>
+              <forceJavacCompilerUse>true</forceJavacCompilerUse>
+              <parameters>true</parameters>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <useModulePath>false</useModulePath>
diff --git a/log4j-plugins/src/main/java/module-info.java 
b/log4j-plugins/src/main/java/module-info.java
index cee041c..37820a4 100644
--- a/log4j-plugins/src/main/java/module-info.java
+++ b/log4j-plugins/src/main/java/module-info.java
@@ -30,7 +30,5 @@ module org.apache.logging.log4j.plugins {
     requires org.apache.logging.log4j;
     requires transitive org.osgi.framework;
 
-    provides org.apache.logging.log4j.plugins.processor.PluginService with 
org.apache.logging.log4j.plugins.convert.plugins.Log4jPlugins;
-
     uses org.apache.logging.log4j.plugins.processor.PluginService;
 }
diff --git 
a/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/convert/plugins/Log4jPlugins.java
 
b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/convert/plugins/Log4jPlugins.java
new file mode 100644
index 0000000..61f1e7d
--- /dev/null
+++ 
b/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/convert/plugins/Log4jPlugins.java
@@ -0,0 +1,36 @@
+package org.apache.logging.log4j.plugins.convert.plugins;
+
+import org.apache.logging.log4j.plugins.processor.PluginEntry;
+import org.apache.logging.log4j.plugins.processor.PluginService;
+
+public class Log4jPlugins extends PluginService {
+
+    private static PluginEntry[] entries = new PluginEntry[] {
+        new PluginEntry("bigdecimal", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$BigDecimalConverter", 
"BigDecimal", false, false, "TypeConverter"),
+        new PluginEntry("biginteger", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$BigIntegerConverter", 
"BigInteger", false, false, "TypeConverter"),
+        new PluginEntry("boolean", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$BooleanConverter", 
"Boolean", false, false, "TypeConverter"),
+        new PluginEntry("bytearray", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$ByteArrayConverter", 
"ByteArray", false, false, "TypeConverter"),
+        new PluginEntry("byte", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$ByteConverter", 
"Byte", false, false, "TypeConverter"),
+        new PluginEntry("character", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$CharacterConverter", 
"Character", false, false, "TypeConverter"),
+        new PluginEntry("characterarray", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$CharArrayConverter", 
"CharacterArray", false, false, "TypeConverter"),
+        new PluginEntry("charset", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$CharsetConverter", 
"Charset", false, false, "TypeConverter"),
+        new PluginEntry("class", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$ClassConverter", 
"Class", false, false, "TypeConverter"),
+        new PluginEntry("double", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$DoubleConverter", 
"Double", false, false, "TypeConverter"),
+        new PluginEntry("file", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$FileConverter", 
"File", false, false, "TypeConverter"),
+        new PluginEntry("float", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$FloatConverter", 
"Float", false, false, "TypeConverter"),
+        new PluginEntry("inetaddress", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$InetAddressConverter", 
"InetAddress", false, false, "TypeConverter"),
+        new PluginEntry("integer", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$IntegerConverter", 
"Integer", false, false, "TypeConverter"),
+        new PluginEntry("level", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$LevelConverter", 
"Level", false, false, "TypeConverter"),
+        new PluginEntry("long", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$LongConverter", 
"Long", false, false, "TypeConverter"),
+        new PluginEntry("path", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$PathConverter", 
"Path", false, false, "TypeConverter"),
+        new PluginEntry("pattern", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$PatternConverter", 
"Pattern", false, false, "TypeConverter"),
+        new PluginEntry("securityprovider", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$SecurityProviderConverter",
 "SecurityProvider", false, false, "TypeConverter"),
+        new PluginEntry("short", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$ShortConverter", 
"Short", false, false, "TypeConverter"),
+        new PluginEntry("string", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$StringConverter", 
"String", false, false, "TypeConverter"),
+        new PluginEntry("uri", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$UriConverter", "URI", 
false, false, "TypeConverter"),
+        new PluginEntry("url", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$UrlConverter", "URL", 
false, false, "TypeConverter"),
+        new PluginEntry("uuid", 
"org.apache.logging.log4j.plugins.convert.TypeConverters$UuidConverter", 
"UUID", false, false, "TypeConverter")
+    };
+    @Override
+    public PluginEntry[] getEntries() { return entries;}
+}
diff --git 
a/log4j-plugins/src/main/resources/META-INF/services/org.apache.logging.log4j.plugins.processor.PluginService
 
b/log4j-plugins/src/main/resources/META-INF/services/org.apache.logging.log4j.plugins.processor.PluginService
new file mode 100644
index 0000000..dc436cf
--- /dev/null
+++ 
b/log4j-plugins/src/main/resources/META-INF/services/org.apache.logging.log4j.plugins.processor.PluginService
@@ -0,0 +1 @@
+org.apache.logging.log4j.plugins.convert.plugins.Log4jPlugins

Reply via email to