views:

819

answers:

2

Hi all! I am currently trying to obfuscate my Eclipse RCP application with ProGuard. The problem is that it obfuscates the package names (the class My.Package.Class turns into something like a.b.c), but keeps the package names in the Export-Package section of MANIFEST.MF.

This leads to the fact that my application (which is a set of OSGi-bundles, actually) cannot be run, as the package names specified in Export-Package section of MANIFEST.MFs cannot be resolved.

Has anybody had any success with ProGuard obfuscating an OSGi-based RCP application? Basically, I see two choices: either completely turn off package names obfuscation, or obfucate MANIFEST.MF's Export-Package section, but I can't find the way to implement any of them. Proguard seems to obfuscate only Bundle-Activator class name in MANIFEST.MF, skipping all other sections. Thanks in advance!

+3  A: 

Turn off package name obfuscation; I mean what important business values are you exposing by telling the world the package names?

If that really is an issue, move all code into a fully obfuscated library and use the library in a non-obfuscated plugin.

That said, consider not wasting your time with obfuscation at all. It will cost you time and money and it's questionable whether there is any benefit. At the time when your competitors have started to disassemble your valuable work, you will be writing the next version. So why bother?

Aaron Digulla
Aaron, thank you for your answer! As I said, turning off the package names obfuscation would work, but I don't know how to implement this (and if this can be achieved at all) with Proguard...To obfuscate or not to obfuscate - this is not the choice. Our customer wants this :)
Sergey Borodavkin
In that case, use my second suggestion.
Aaron Digulla
Thank you! I have followed your proposition and joined all modules into one megabundle, eliminating in such way all inter-module dependencies causing the troubles.It worked.
Sergey Borodavkin
A: 

Protect Eclipse RCP apps via native compilation

Dmitry Leskov
We have to use ProGuard. Moreover, commercial solution is not a choice for us.
Sergey Borodavkin
There are free licenses available for non-commercial projects, though I do not quite understand why would anyone want to protect a free app from decompilers.
Dmitry Leskov
@Dmitry Leskov: see http://www.irosetta.com/questions/521/meta-move-to-shapado-imminent-check-your-credentials
Peter Mortensen