proguard with multi versioned jars
Asked Answered
D

2

6

I get the following error while running the obfuscation [proguard] Warning: class [META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class] unexpectedly contains class [org.apache.logging.log4j.util.ProcessIdUtil]

it looks like proguard introspects into META-INF folder and attempts to process the classes that are found in that directory

this happens although i added the line -libraryjars log4j-api-2.10.0.jar (for all the log4j jars)

this happens in proguard version 6.0.2

Dynamics answered 15/4, 2018 at 14:34 Comment(0)
F
6

ProGuard can only process a single version of the code. If the jars that you specify with -injars or -libraryjars contain multiple version, you can filter out the alternative versions, e.g.

-injars log4j-api-2.10.0.jar(!META-INF/versions/**)
Floc answered 15/4, 2018 at 14:47 Comment(0)
I
1

This is a known Bug. It will be fixed within 2.2.1.

Please do not filter versioned jars because this will deactivate proguard for those jars.

Infecund answered 21/2, 2020 at 9:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.