I have created a module-info.java file and added it to the project. I then ran mvn clean install in log4j-core. I expected it to have problems but not these.
1. Activator.java is getting an error saying it can’t find the Log4jPlugins class. However, after the compile fails you can clearly see the generated class in the appropriate directory. I have created https://issues.apache.org/jira/browse/MCOMPILER-461 <https://issues.apache.org/jira/browse/MCOMPILER-461> for this problem. 2. I get 4 of these warnings [WARNING] /Users/rgoers/projects/apache/logging/log4j/logging-log4j2/log4j-core/src/main/java/org/apache/logging/log4j/core/Filter/package-info.java:[24,37] a package-info.java file has already been seen for package org.apache.logging.log4j.core.filter Notice that the filter package is capitalized in the message. That directory is lower case on the file system. 3. I get many errors like [ERROR] /Users/rgoers/projects/apache/logging/log4j/logging-log4j2/log4j-core/src/main/java/org/apache/logging/log4j/core/Filter/StructuredDataFilter.java:[46,13] error: duplicate class: org.apache.logging.log4j.core.filter.StructuredDataFilter Once again, notice that “Filter” is capitalized. This error seems to occur for every class in the filter, appender, and layout directory, each of which has an interface with the same package and name except the interface is capitalized while the directory and package are not. These errors go away with javac from Java 12 and above. I have reported a bug with the OpenJDK compiler project for these. If you want to take a look I have pushed the changes to the module-compile-fails branch. Simply moving the module-info.java file out of the source directory will cause the compile to succeed. Ralph