You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2021/04/17 22:12:15 UTC

[logging-log4j2] 01/02: Demonstrate compiler failure

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

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

commit ada0d4428cfb327652659d78313a90851fe1cc20
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sat Apr 17 13:20:40 2021 -0700

    Demonstrate compiler failure
---
 log4j-core/pom.xml                                 |  2 -
 log4j-core/src/main/java/module-info.java          | 85 ++++++++++++++++++++++
 .../logging/log4j/core/plugins/package-info.java   | 20 +++++
 pom.xml                                            | 25 ++++---
 4 files changed, 119 insertions(+), 13 deletions(-)

diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index f7d81f8..28ee29b 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -382,8 +382,6 @@
                   <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
                   <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                   <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
-                  <Automatic-Module-Name>org.apache.logging.log4j.core</Automatic-Module-Name>
-                  <Multi-Release>true</Multi-Release>
                 </manifestEntries>
               </archive>
             </configuration>
diff --git a/log4j-core/src/main/java/module-info.java b/log4j-core/src/main/java/module-info.java
new file mode 100644
index 0000000..a548d36
--- /dev/null
+++ b/log4j-core/src/main/java/module-info.java
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+module org.apache.logging.log4j.core {
+    exports org.apache.logging.log4j.core;
+    exports org.apache.logging.log4j.core.appender;
+    exports org.apache.logging.log4j.core.appender.db;
+    exports org.apache.logging.log4j.core.appender.nosql;
+    exports org.apache.logging.log4j.core.appender.rewrite;
+    exports org.apache.logging.log4j.core.appender.rolling;
+    exports org.apache.logging.log4j.core.appender.rolling.action;
+    exports org.apache.logging.log4j.core.appender.routing;
+    exports org.apache.logging.log4j.core.async;
+    exports org.apache.logging.log4j.core.config;
+    exports org.apache.logging.log4j.core.config.arbiters;
+    exports org.apache.logging.log4j.core.config.builder.api;
+    exports org.apache.logging.log4j.core.config.builder.impl;
+    exports org.apache.logging.log4j.core.config.composite;
+    exports org.apache.logging.log4j.core.config.json;
+    exports org.apache.logging.log4j.core.config.plugins;
+    exports org.apache.logging.log4j.core.config.plugins.convert;
+    exports org.apache.logging.log4j.core.config.plugins.inject;
+    exports org.apache.logging.log4j.core.config.plugins.util;
+    exports org.apache.logging.log4j.core.config.plugins.visitors;
+    exports org.apache.logging.log4j.core.config.properties;
+    exports org.apache.logging.log4j.core.config.status;
+    exports org.apache.logging.log4j.core.config.xml;
+    exports org.apache.logging.log4j.core.config.yaml;
+    exports org.apache.logging.log4j.core.filter;
+    exports org.apache.logging.log4j.core.impl;
+    exports org.apache.logging.log4j.core.jmx;
+    exports org.apache.logging.log4j.core.layout;
+    exports org.apache.logging.log4j.core.lookup;
+    exports org.apache.logging.log4j.core.message;
+    exports org.apache.logging.log4j.core.net;
+    exports org.apache.logging.log4j.core.net.ssl;
+    exports org.apache.logging.log4j.core.osgi;
+    exports org.apache.logging.log4j.core.parser;
+    exports org.apache.logging.log4j.core.pattern;
+    exports org.apache.logging.log4j.core.script;
+    exports org.apache.logging.log4j.core.selector;
+    exports org.apache.logging.log4j.core.time;
+    exports org.apache.logging.log4j.core.tools;
+    exports org.apache.logging.log4j.core.tools.picocli;
+    exports org.apache.logging.log4j.core.util;
+    exports org.apache.logging.log4j.core.util.datetime;
+
+    requires transitive java.desktop;
+    requires transitive java.management;
+    requires java.naming;
+    requires transitive java.sql;
+    requires java.rmi;
+    requires transitive java.scripting;
+    requires java.xml;
+    requires org.apache.logging.log4j;
+    requires org.apache.logging.log4j.plugins;
+    requires transitive com.lmax.disruptor;
+    requires transitive org.jctools.core;
+    requires transitive org.osgi.core;
+    requires transitive com.conversantmedia.disruptor;
+    requires transitive com.fasterxml.jackson.core;
+    requires transitive com.fasterxml.jackson.databind;
+    requires transitive com.fasterxml.jackson.dataformat.xml;
+    requires transitive com.fasterxml.jackson.dataformat.yaml;
+    requires transitive org.apache.commons.compress;
+    requires transitive org.fusesource.jansi;
+    uses org.apache.logging.log4j.core.util.ContextDataProvider;
+    provides org.apache.logging.log4j.message.ThreadDumpMessage$ThreadInfoFactory with org.apache.logging.log4j.core.message.ExtendedThreadInfoFactory;
+    provides org.apache.logging.log4j.core.util.ContextDataProvider with org.apache.logging.log4j.core.impl.ThreadContextDataProvider;
+    provides org.apache.logging.log4j.spi.Provider with org.apache.logging.log4j.core.impl.Log4jProvider;
+    provides org.apache.logging.log4j.plugins.processor.PluginService with org.apache.logging.log4j.core.plugins.Log4jPlugins;
+}
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/plugins/package-info.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/plugins/package-info.java
new file mode 100644
index 0000000..33dbfd3
--- /dev/null
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/plugins/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+/**
+ * Placeholder package. The plugins class will be generated here and needs to be present .
+ */
+package org.apache.logging.log4j.core.plugins;
diff --git a/pom.xml b/pom.xml
index ca5dc58..8f6b1a0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -188,13 +188,13 @@
     <slf4jVersion>1.7.25</slf4jVersion>
     <logbackVersion>1.2.3</logbackVersion>
     <jackson1Version>1.9.13</jackson1Version>
-    <jackson2Version>2.11.2</jackson2Version>
+    <jackson2Version>2.12.3</jackson2Version>
     <spring-boot.version>2.3.6.RELEASE</spring-boot.version>
     <springVersion>5.3.2</springVersion>
     <kubernetes-client.version>4.6.1</kubernetes-client.version>
     <flumeVersion>1.9.0</flumeVersion>
-    <disruptorVersion>3.4.2</disruptorVersion>
-    <conversantDisruptorVersion>1.2.15</conversantDisruptorVersion>
+    <disruptorVersion>3.4.3</disruptorVersion>
+    <conversantDisruptorVersion>1.2.19</conversantDisruptorVersion>
     <elastic.version>7.6.2</elastic.version>
     <mongodb3.version>3.12.4</mongodb3.version>
     <mongodb4.version>4.0.3</mongodb4.version>
@@ -243,7 +243,7 @@
     <activemq.version>5.15.9</activemq.version>
     <!-- Allow Clirr severity to be overriden by the command-line option -DminSeverity=level -->
     <minSeverity>info</minSeverity>
-    <jctoolsVersion>3.1.0</jctoolsVersion>
+    <jctoolsVersion>3.3.0</jctoolsVersion>
     <junitVersion>4.13.1</junitVersion>
     <junitJupiterVersion>5.7.0</junitJupiterVersion>
     <mockitoVersion>3.5.5</mockitoVersion>
@@ -456,7 +456,7 @@
       <dependency>
         <groupId>org.fusesource.jansi</groupId>
         <artifactId>jansi</artifactId>
-        <version>1.17.1</version>
+        <version>2.3.2</version>
         <optional>true</optional>
       </dependency>
       <dependency>
@@ -1007,13 +1007,16 @@
             <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>
+              <!--<arg>-Xplugin:ErrorProne</arg>-->
+              <!--<arg>-XprintProcessorInfo</arg>-->
+              <arg>-J-verbose</arg>
             </compilerArgs>
             <compilerArguments>
               <Xmaxwarns>10000</Xmaxwarns>
@@ -1021,15 +1024,15 @@
             </compilerArguments>
             <annotationProcessorPaths>
               <path>
-                <groupId>com.google.errorprone</groupId>
-                <artifactId>error_prone_core</artifactId>
-                <version>${errorprone.version}</version>
-              </path>
-              <path>
                 <groupId>org.apache.logging.log4j</groupId>
                 <artifactId>log4j-plugins</artifactId>
                 <version>${project.version}</version>
               </path>
+              <!--<path>
+                <groupId>com.google.errorprone</groupId>
+                <artifactId>error_prone_core</artifactId>
+                <version>${errorprone.version}</version>
+              </path> -->
             </annotationProcessorPaths>
             <forceJavacCompilerUse>true</forceJavacCompilerUse>
             <parameters>true</parameters>