Hi Jörg,

Thanks... My original plan to obfuscate the class before unit testing didn't work out very well because I ended up not obfuscating almost all of the class and member names in order to get the tests to compile, so I ended up moving the proguard plugin execution to the package phase after the jar is created and moved to the jarsigner plugin at that time...

Cheers
Chris




On Mar 31, 2011, at 1:20 PM, Jörg Schaible wrote:

Hi Chris,

Chris von See wrote:

I'm a new user of Maven.  I have a POM that is creating a signed jar
using Maven 3.0.2 and maven-jar-plugin - that part seems to be working
well, but now I want to integrate ProGuard in order to obfuscate the
code before signing the JAR.  Ideally I'd like to obfuscate the code
before the Maven test phase so that tests will run on the obfuscated
code, but the ProGuard docs seem to imply that I can only obfuscate
the code after it's been packaged into a JAR.  Has anybody run
ProGuard on the pre-test-phase compiled classes, and if so how did you
set up your POM and ProGuard configuration?

If it's true that I can only obfuscate a JAR then I'm not clear on how
I would insert a ProGuard goal in between the point at which the JAR
to be signed is created and the actual signing process - the docs for
the proguard-maven-plugin aren't quite clear on how that's done. Do I need to split the process into a jar creation step using the maven- jar-
plugin, a ProGuard step and then a signing step using the maven-
jarsigner-plugin? and if so, how can I set this up so that the goals
run in this order within the package phase without explicitly
specifying them on the command line?

note, that signing a jar with the jar plugin is deprecated. You should use
the jarsigner plugin instead. Therefore it should not be a problem to
execute another plugin before the resulting jar is signed.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to