I have to reduce the size of the war file so that I could deploy it to an external tomcat server. My war file is too huge (30MB) so it's not getting deployed.
Asked
Active
Viewed 609 times
1
-
Check the dependencies if you really need them ? Means take a look into your pom file and look if the given dependencies are really needed furthermore check if all the dependencies have the correct scope ? For example junit has test scope etc. – khmarbaise May 14 '19 at 05:40
1 Answers
0
You can consider copying JARs that your webapp use to Tomcat /lib
folder (Refer docs for details about Tomcat class-loading behaviour).
Depending on what build tool you use , configure it to exclude packing these JARs to the WAR. For example in case of Maven , revise pom.xml
to change the dependencies related to these JARs to the provided
scope.

Ken Chan
- 84,777
- 26
- 143
- 172