ProGuard 怎样混淆 web项目 SSH
1、由于我的程序要发布到生产的机器上了,担心被反编译,故决定混淆。但是我使用 ProGuard 4.8
一混淆就出现了很多的类重复定义的提示。还有
Note: there were 106 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
Note: there were 1 class casts of dynamically created class instances.
You might consider explicitly keeping the mentioned classes and/or
their implementations (using '-keep').
Note: there were 114 accesses to class members by means of introspection.
You should consider explicitly keeping the mentioned class members
(using '-keep' or '-keepclassmembers').
Note: You're ignoring all warnings!
我只想混淆指定的包中的类、
遍寻网上,那些配置文件针对 web项目 SSH 的基本上都是不能用的。
以下是我根据 Proguard 的 文档写的测试配置文件
-printmapping myapplication.map
-dontshrink
-dontoptimize
-dontpreverify
-keep class com.sch.**{
void set*(***);
*** get*();
}
-keep class org.**{*;}
-keep class antlr.**{*;}
-keep class net.**{*;}
-keep class freemarker.**{*;}
-keep class javassist.**{*;}
-keep class javax.**{*;}
-keep class junit.**{*;}
-keep class ognl.**{*;}
-keep class oracle.**{*;}
-keep class com.mchange.**{*;}
-keep class com.opensymphony.**{*;}
-keep class com.microsoft.**{*;}
-keep class microsoft.**{*;}
-keep class com.sun.**{*;}
-dontwarn
这个混淆的后生成的 war 文件我的项目的类被 被proguard 全部弄不见了。
大家有混淆过 ssh 项目的请指教一下。