I have several maven projects, which are in one repository. All of them have libraries:
/repo/bin/apps/[first]/WEB-INF/lib
/repo/bin/apps/[second]/WEB-INF/lib
/repo/bin/apps/[third]/WEB-INF/lib
All of them are spring boot apps and running at the very same tomcat.
And some of them are using the very same libraries. We would like to save disk space. The idea is to have one shared folder (i.e. /repo/bin/apps/lib), where I will store libraries, so it is not needed to have them twice or thrice.
I was able to find questions about the other way (how to add a library to /WEB-INF/lib folder), but how to make libraries shared?
I found a "solution". It could be shared via the tomcat classpath folder, which is placed in ../bin/tomcat, this folder is added as a classpath by default.
I tested this solution for one application. I moved all libraries to this folder and then try to run tomcat, it worked. But it's no silver bullet...
It looks like spring-boot is not able to run multiple apps from one classpath. This will be the topic of my next question.