> 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?
In the android world this is exactly what you need to do too.. and I wrote some blog posts that explain the details and link to a fully working example implementation. http://www.simpligility.com/2010/12/proguard-for-android-with-maven-without-shooting-yourself-in-the-foot/ http://www.simpligility.com/2010/12/hints-for-using-proguard-on-your-android-app/ That should explain it all. manfred http://simpligility.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
