Proguard无法模糊我的.jar文件。我使用IntelliJ和Maven
它引发了很多通知' [proguard]注意:库类的重复定义'
以及许多警告,包括:
'警告:org.jboss.netty.example.localtime.LocalTimeProtocol $ LocalTimes $ Builder:无法找到引用的类com.google.protobuf.ExtensionRegistryLite'
[proguard] Note: javassist.util.proxy.ProxyFactory accesses a declared field 'handler' dynamically
[proguard] Maybe this is program field 'javassist.bytecode.analysis.Analyzer$ExceptionInfo { int handler; }'
[proguard] Maybe this is program field 'javassist.util.proxy.ProxyFactory { javassist.util.proxy.MethodHandler handler; }'
[proguard] Maybe this is program field 'javassist.util.proxy.SerializedProxy { javassist.util.proxy.MethodHandler handler; }'
[proguard] Maybe this is program field 'org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext { org.jboss.netty.channel.ChannelHandler handler; }'
[proguard] Maybe this is program field 'org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext { org.jboss.netty.channel.ChannelHandler handler; }'
[proguard] Maybe this is program field 'org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketChannel { org.jboss.netty.channel.socket.http.HttpTunnelingClientSocketChannel$ServletChannelHandler handler; }'
[proguard] Maybe this is library field 'javax.xml.ws.spi.http.HttpContext { javax.xml.ws.spi.http.HttpHandler handler; }'
[proguard] Maybe this is library field 'sun.applet.AppletPanel { java.lang.Thread handler; }'
[proguard] Maybe this is library field 'sun.net.www.protocol.http.HttpURLConnection { sun.net.www.protocol.http.Handler handler; }'
[proguard] Note: there were 1 references to unknown classes.
[proguard] You should check your configuration for typos.
[proguard] (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
[proguard] Warning: there were 874 unresolved references to classes or interfaces.
[proguard] Note: there were 5 class casts of dynamically created class instances.
[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] You might consider explicitly keeping the mentioned classes and/or
[proguard] their implementations (using '-keep').
[proguard] (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
[proguard] Warning: there were 65 unresolved references to program class members.
[proguard] (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclasscast)
[proguard] Note: there were 10 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] 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.
我的pom:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>com.eu.habbo.Emulator</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.6</version>
<dependencies>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>4.10</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>package</phase>
<goals><goal>proguard</goal></goals>
</execution>
</executions>
<configuration>
<proguardVersion>4.10</proguardVersion>
<options>
<option>-keep public class myapp.Main{public static void main(java.lang.String[]);}</option>
</options>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
<lib>${java.home}/lib/jce.jar</lib>
<lib>C:\Users\wesley\.m2\repository\org\jboss\netty\netty\3.2.0.Final\netty-3.2.0.Final.jar</lib>
<lib>C:\Users\wesley\.m2\repository\mysql\mysql-connector-java\5.1.31\mysql-connector-java-5.1.31.jar</lib>
<lib>C:\Users\wesley\.m2\repository\org\slf4j\slf4j-simple\1.7.7\slf4j-simple-1.7.7.jar</lib>
<lib>C:\Users\wesley\.m2\repository\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar</lib>
<lib>C:\Users\wesley\.m2\repository\com\zaxxer\HikariCP\1.4.0\HikariCP-1.4.0.jar</lib>
</libs>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<version>3.2.0.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.31</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
<version>3.0.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>1.4.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
我必须混淆这个.JAR。我找不到Maven项目的其他替代方案。我找到了yGuard,但那是蚂蚁。