ppkarwasz commented on issue #1896:
URL: 
https://github.com/apache/logging-log4j2/issues/1896#issuecomment-1776598967

   @CodeDead,
   
   The problem seems to come from the fact that `log4j-core` contains an 
annotation processor:
   ```
   provides javax.annotation.processing.Processor with 
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
   ```
   The processor itself depends on the `java.compiler` module, which is 
optional:
   ```
   requires static java.compiler
   ```
   
   We should probably remove `static` from the `java.compiler` module. @jvz, 
@vy, what do you think?
   
   You can easily work around this problem, by adding `--add-modules 
java.compiler` to the `jlink` invocation.
   
   **Remark:** Even if we solve this problem, `jlink` complains about 
`log4j-api`:
   ```
   [ERROR] Error: java.lang.RuntimeException: Module org.apache.logging.log4j's 
descriptor indicates the set of packages is : [org.apache.logging.log4j.status, 
org.apache.logging.log4j.message, org.apache.logging.log4j.util, 
org.apache.logging.log4j.simple, org.apache.logging.log4j, 
org.apache.logging.log4j.internal, org.apache.logging.log4j.spi], but module 
contains packages: [org.apache.logging.log4j.status, org.apache.logging.log4j, 
org.apache.logging.log4j.util.internal, org.apache.logging.log4j.internal, 
org.apache.logging.log4j.spi, org.apache.logging.log4j.util, 
org.apache.logging.log4j.message, org.apache.logging.log4j.simple]
   ```
   In this case the problem is that `META-INF/versions/9` contains a new 
package (`org.apache.logging.log4j.util.internal`), which is not present in the 
Java 8 version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to