devslm / proguard-spring-boot-example

Proguard Spring Boot Maven Plugin Example
Apache License 2.0
155 stars 60 forks source link

How to convert jar to war after obfuscation? #6

Closed pavangayakwad closed 2 years ago

pavangayakwad commented 3 years ago

I am obfuscating java spring boot REST API project, the obfuscation works fine and when I run the obfuscated jar with command line java -jar my_rest_api_app.jar it work fine! but when I rename the .jar file to .war and deploy it on tomcat server, it throws error. What am I missing here? please guide!

image

devslm commented 3 years ago

Hi! I think you can’t just rename jar to war because the directory structure can be different and spring boot require some dependencies for servlet. I’ll try to check this problem.

pavangayakwad commented 3 years ago

Looking forward to it.

devslm commented 3 years ago

I tried to start the war web service but it still fails. The code that I got I pushed to the feature/add-servlet-example branch. The idea is to obfuscate classes before packing the war and then run repackage war. You can see it and maybe you can find some useful ideas.

pavangayakwad commented 3 years ago

Thanks for taking time, looking into it and responding promptly! I will sure check and revert if I make some progress.