This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Obfuscate war file

 
mdraj group
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can anyone please let me know how to Obfuscate the war file using progaurd. I have tried but not succeed, added the below code in build.xml



below one is the .pro config file that basically tells that in and out jars.




I am able to produce the out_war file but when i open this output file there is no class files in classes directory.

Can any one give a hand to fix this or any suggestions.


Thanks in advance.

Thanks
MDRaj
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A .war file is not a .jar file. Apply ProGuard to classes and jar files only, and the create the .war file with the results.
 
mdraj group
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:A .war file is not a .jar file. Apply ProGuard to classes and jar files only, and the create the .war file with the results.



Thanks for the reply.

You mean, cant we apply obfuscation directly to .war file. first i have make jar for classes in classes folder and then appy obfuscation and then unzip jar to classes folder and then prepare war. am i right?
instead It would be better to apply obfuscation directly to classes folder.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can't apply obfuscation to .war files.

No, you're wrong, it's perfectly possibly to apply obfuscation to .jar files, as I said in my previous post. There is no benefit in applying obfuscation to the classes folder instead of applying it to .jar files.
 
mdraj group
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Yes, you can't apply obfuscation to .war files.

No, you're wrong, it's perfectly possibly to apply obfuscation to .jar files, as I said in my previous post. There is no benefit in applying obfuscation to the classes folder instead of applying it to .jar files.


I have tried to prepare jar and then obfuscate but still out put jar is not obfuscated means .class file names s are not changed.

Here is my build.xml file. default task is "war" (default="war")




Here is my .pro config file



Can you please let me know where i did done mistake.


Thanks
MDRaj

 
mdraj group
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody look into this issue Please

Thanks
MDRaj

 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what's going on. This is about the most minimal configuration that works fine in creating an obfuscated jar file from an unobfuscated one (after fixing the two paths I have omitted):
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic