I'm trying to get Proguard to obfuscate a simple .war file. According to the docs Proguard handles .war files, but when I try I get this:
Warning: class [WEB-INF/classes/com/corp/gr/t2b/T2BChannel.class] unexpectedly contains class [com.corp.gr.t2b.T2BChannel]
The docs mention something about Proguard not liking .war files with classes in the WEB-INF/classes directory. So I put all the .class files in their own .jar file in WEB-INF/lib.
Then Proguard complains that it cannot find any of the JavaEE 6 classes, even though I've given it the javaee.jar file with
-libraryjars C:/bin/glassfish-3.0.1/.../lib/javaee.jar
So I parse out all of the entries in the javaee.jar file MANIFEST.MF and add each one of them with multiple
-libraryjars C:/bin/glassfish-3.0.1/.../modules/javax.servlet.jar
statements.
Proguard indicates that it is reading the various library jars and then scrolls thousands of "duplicate definition of library class" messages and some other messages. (The messages aren't logged so they just scroll off the screen.) At the end of all of these messages it finishes with
Note: there were 965 duplicate class definitions.
Warning: there were 816 classes in incorrectly named files.
There are also hundreds (or thousands - I can't tell because these can't be redirected to a file) of warnings of the form
Warning: class [1.0/org/apache/xml/resolver/tools/ResolvingXMLReader.class] unex
pectedly contains class [org.apache.xml.resolver.tools.ResolvingXMLReader]
So Proguard doesn't seem to be able to deal with the JavaEE 6 libraries.
Has anyone gotten Proguard to work with a JavaEE 6 application? What did you have to do to make it work with the JavaEE 6 libraries?