[fedora-java] New shaded artifacts in objectweb-asm3

Michal Srb msrb at redhat.com
Thu Dec 5 15:29:59 UTC 2013


Hi guys,

I would like to share a quick tip on how to solve class loading 
conflicts when both asm3 and asm4 libraries are on class path. Upstream 
projects usually solve this problem by bundling shaded versions of 
asm3/asm4, but due to "no bundled libraries" rule this trick cannot be 
used in Fedora.
Our objectweb-asm3 package now provides shaded versions of all artifacts 
in this package (in addition to original ones). Only difference between 
original artifacts and our shaded artifacts is that all classes have 
been relocated from "org.objetweb.asm" to 
"org.objectweb.distroshaded.asm" package. gId:aId of these shaded 
artifacts is the same as gId:aId of their original counterparts, but 
they have classifier "distroshaded".
So if upstream of your package bundles asm3 and unbundled version causes 
problems somewhere, then you can simply change the "org.objectweb.asm.*" 
imports in .java files and add proper deps/requires on shaded asm3 
artifacts (e.g.: "asm:asm-all::distroshaded:").

Regards
Michal


More information about the java-devel mailing list