java maven proguard plugin obfuscator

时间:2015-05-15 11:10:20

标签: java spring maven proguard obfuscation

我正在尝试模糊我正在开发的Java应用程序,并决定使用Proguard maven plugin来完成它。

我使用以下proguard配置解决了一些问题:

# Don't obfuscate or remove your entry point
-keep public class com.appspot.Main {
    public static void main(java.lang.String[]);
}

# Supress warnings from javax.servlet
-dontwarn javax.servlet.**

-keepattributes *Annotation*,Signature,InnerClasses

现在我遇到以下错误:

 [proguard] Note: org.springframework.core.io.support.PathMatchingResourcePatternResolver accesses a method 'resolve(java.net.URL)' dynamically
 [proguard] Note: there were 18 unresolved dynamic references to classes or interfaces.
 [proguard]       You should check if you need to specify additional program jars.
 [proguard]       (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
 [proguard] Note: there were 1 class casts of dynamically created class instances.
 [proguard]       You might consider explicitly keeping the mentioned classes and/or
 [proguard]       their implementations (using '-keep').
 [proguard]       (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclasscast)
 [proguard] Note: there were 15 accesses to class members by means of introspection.
 [proguard]       You should consider explicitly keeping the mentioned class members
 [proguard]       (using '-keep' or '-keepclassmembers').
 [proguard]       (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
 [proguard] Warning: there were 370 unresolved references to classes or interfaces.
 [proguard]          You may need to add missing library jars or update their versions.
 [proguard]          If your code works fine without the missing classes, you can suppress
 [proguard]          the warnings with '-dontwarn' options.
 [proguard]          (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
 [proguard] Warning: there were 16 unresolved references to program class members.
 [proguard]          Your input classes appear to be inconsistent.
 [proguard]          You may need to recompile the code.
 [proguard]          (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
 [proguard] Error: Please correct the above warnings first.

0 个答案:

没有答案