Hello Maven Users!

I've come across and filed a bug 
(https://issues.apache.org/jira/browse/MASSEMBLY-891) where the assembly plugin 
fails with multi-release jars such as log4j-api-2.9.1.jar.


Multi-release jars are relatively new, so it's no surprise that there's not 
active support for it yet, but it seems that instead of just "ignoring" them, 
the assembly plugin actively breaks them.


In our specific case one class (org.apache.logging.log4j.util.StackLocator) 
exists twice in log4j-api-2.9.1.jar. Once in the usual place and once under 
META-INF/versions/9. The later one is supposed to be loaded only in Java 9 and 
upwards and as such is compiled with a class file version 53.0.


I expected the assembly plugin to either ignore the second version or just 
straight copy it as it would with any other file under META-INF, but instead 
the output jar contained the version from META-INF/versions/9 under both the 
regular path and under META-INF/versions/9, thus making the output jar 
incompatible with Java 8 or lower.


Has anyone else run into this? Does anyone know of a workaround for this 
problem?


regards

Joachim Sauer

The contents of this e-mail are intended for the named addressee only. It 
contains information that may be confidential. Unless you are the named 
addressee or an authorized designee, you may not copy or use it, or disclose it 
to anyone else. If you received it in error please notify us immediately and 
then destroy it. Dynatrace Austria GmbH (registration number FN 91482h) is a 
company registered in Linz whose registered office is at 4040 Linz, Austria, 
Freistädterstraße 313

Reply via email to