I wonder why the Java Webapps specifications impose a specific directory for dependencies: /WEB-INF/lib .
In fact, why not use the classic /META-INF/MANIFEST.MF file?
Someone will say that webapps are so much safer because libs are physically integrated into the WAR file.
But, if we think so, we might wonder:
Why is there no special directory for dependencies for a simple Java application (simple JAR)? It can also be more secure because there is no risk of having the wrong class path (for example, incorrectly modified) in the manifest file.
Another would say that webapp is designed for portability, so the advantage of /WEB-INF/lib is not to worry about link dependencies.
I am curious to know your opinion on this matter.
source share