简体   繁体   中英

Where Should i keep my jar files so that All projects commonly used them?

I Have to deploy 40 to 50 Spring Mvc project on Linux server So every project must contains Spring jar file in its lib folder

Is there any way to keep all jar file at one one place so that all the projects could use

I have tried to placed all file in Apache-tomcat's lib folder and remove Spring's jar file from the Spring MVC's project lib folder

But after that all the url stop working and i didn't get any exception and i also compile all java files by using the

javac -cp :/path of Apache-tomcat's lib/*.jar: className.java

I didnt get any exception all filed compiled successfully

If anyone knows how can i managed these jar files then please let me know

Should i need to define the path in projects files like web.xml or meta-inf So that When the projects run it automatically find the jar at some specific place...

  • When you deploy web application to production server (Apache Tomcat in this case), you don't copy any JAR file for application working, because application packaged in WAR file format.
  • If you want using many Spring-based web applications for development, testing purpose, you also don't need copy JAR files many times. Use Gradle or Maven dependencies management tool. (You maybe need covert legacy project to new project structure when use new generation build tools like Gralde, Maven).

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