简体   繁体   中英

Is it possible to store all jars in Tomcat lib folder?

We have a few projects and we store libs in project folders (each project has it's own libs) and we store shared libs in tomcat lib folder:

 ·Project1\lib
 ·Project2\lib
 ·…
 ·Tomcat\lib

Our manager proposed to combine all libs and put all jars in Tomcat lib folder.

Advantages of this approach are the following:

  1. It will decrease compile time to .war file

  2. It will decrease size of .war file

I feel that this decision is not the best one the but I can't prove it. Is there any disadvantages of this approach?

The resultant .war application file is less portable. Additional installation steps since the webapp is no longer self-contained.

Or to argue against your boss' logic.

  1. Compiling should be automated in continuous integration, so time spent is not real person time
  2. Space is cheap

Don't consolidate. Consolidation will prevent different projects from using different versions of a particular 3rd party library. This is why different webapps are isolated from each other.

Some libraries also store things statically ( sigh ), which can cause cross-webapp pollution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM