Question

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!

Was it helpful?

Solution

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?

OTHER TIPS

OSGi bundle obfuscation is not supported built-in by ProGuard. Check the Proguard feature request #135 for more info.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top