My multi-jar app runs in Java 11 and shows a warning related to Log4j2:
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
It doesn't crash, but quite bothers me since the Operations team (AppDynamics monitor) has asked me about it. I read that I need to use the "Multi-Release:true" entry in the manifest, but I don't kow how to tell the Maven Assembly Plugin to add it.
I don't use any other plugin in the pom.xml. Should I use the Maven Shade Plugin instead?
Anyway, here's the Maven Assembly Plugin section of my pom.xml.
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
The library I'm including (that I also wrote) uses Log4j 2 as a dependency, as shown below:
<!-- Log4j 2 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.12.1</version>
</dependency>
How can I get rid of this warning?