Andres Luuk created MSHADE-436: ---------------------------------- Summary: Skips relocation of dependencies if not referenced from class body. Key: MSHADE-436 URL: https://issues.apache.org/jira/browse/MSHADE-436 Project: Maven Shade Plugin Issue Type: Bug Affects Versions: 3.4.1, 3.4.0, 3.3.0 Reporter: Andres Luuk
So I have a class like this: import static org.objectweb.asm.Opcodes.*; public class CheckUtil { public static boolean isPrivate(int access) { return (access & ACC_PRIVATE) == ACC_PRIVATE; } } At compile time Opcodes is inlined. So nothing in the class should reference the class. But If I look at the javap of CheckUtil.class I see the following: Constant pool: #1 = Class #2 // org/objectweb/asm/Opcodes #2 = Utf8 org/objectweb/asm/Opcodes Nothing in the method body/later references Opcodes! Now with shade plugin I want to relocation the package of Opcodes. Whit shade 3.2.4 the reference was stripped and was not present in the shaded jar, but now with 3.3.0+ the original not-relocation Opcodes is still present in the constant pool of that class. Maybe stripping the Opcodes was wrong, but in case you don't strip it, you should probably relocation it even it the class body does not reference the class if the class is in the relocation list. We have a shade & relocation into proguard job, where proguard starts to complain that the input shaded jar to the original not-relocation Opcodes. -- This message was sent by Atlassian Jira (v8.20.10#820010)