Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

proguard with multi versioned jars

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

like image 763
Efi G Avatar asked Apr 15 '18 14:04

Efi G


2 Answers

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/**)
like image 193
Eric Lafortune Avatar answered Sep 25 '22 13:09

Eric Lafortune


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.

like image 25
Grim Avatar answered Sep 23 '22 13:09

Grim