I can only second that idea. I am using it for Android applications built
with Maven and blogged a few tips for setting it up recently. That might
help for normal stuff as well (e.g. keeping the map file if you
obfuscate..)

See more

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/

manfred




> http://pyx4me.com/pyx4me-maven-plugins/proguard-maven-plugin/.
> Obfuscate the jars that go into the war or obfuscate the classes
> directly before they are packaged into the war. The plugin can do
> both. Deploy the zip to your repository as well as the war.
>
> Kalle
>
>
> On Fri, Jan 28, 2011 at 4:23 PM, Karsten Silz <[email protected]> wrote:
>>
>> Hi,
>>
>> Part of my job is to maintain an Ant build to obfuscate a web app. This
>> happens in four steps:
>> - Ant builds the WAR file on PC
>> - WAR file gets uploaded to a server where it is obfuscated (which - due
>> to
>> class and method renaming - also changes configuration files and
>> accesses
>> the libraries)
>> - obfuscated WAR file and obfuscation log (needed for decoding stack
>> traces)
>> are added to an internal build application on that server
>> - obfuscated WAR file and obfuscation log are downloaded again to PC,
>> obfuscation log is added to version management (just to be on the safe
>> side)
>>
>> The web app was migrated to Maven more than a year ago, and we've just
>> started using the release plugin (we run our own internal Nexus Maven
>> repository).  But now we want to change the obfuscation build.
>> Additionally, we want to build a ZIP file as the build result that
>> includes
>> the WAR file, along with database scripts, release notes and such.  Now
>> I
>> have these questions:
>>
>> - The Maven Assembly plug-in seems to be the right choice for changing
>> what
>> goes into the WAR file (which we don't want to change), but how can I
>> build
>> the above described ZIP file instead?
>>
>> - How does the obfuscation fit into the Maven lifecylce, since it
>> creates
>> the final artifact, so to speak, but also requires the WAR file to be
>> built,
>> which itself already concludes the packaging phase?  Would I need to
>> "abuse"
>> a later phase (such as "verify") to do the obfuscation?
>>
>> - Sine the AntRun plugin got deprecated with Maven 3, is our own custom
>> plugin the best way to trigger the obfuscation process and download its
>> results?
>>
>> - Since the obfuscation should be part of a Maven release (using the
>> release
>> plugin), the release plugin assumes that there is no locally changed
>> file,
>> compared against the source code repository.  How could we then update
>> the
>> obfuscation log in the our source code management system as part of the
>> Maven release, if at all?
>>
>> - I read somewhere that deploying a custom ZIP file like the one
>> described
>> aboveto our own Maven repository is frowned upon because the Maven
>> repository doesn't know what to do with such a file, unlike a JAR file,
>> for
>> instance.  If that is true, what would we then deploy to our internal
>> Maven
>> repository - just the WAR file?
>>
>> Thank you for your help!
>>
>> Karsten Silz
>> --
>> View this message in context:
>> http://maven.40175.n5.nabble.com/How-to-migrate-Ant-obfuscation-build-to-Maven-tp3362293p3362293.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to