2 years ago

#69938

test-img

Kjempen

How to manage third party common libs in Tomcat?

In our Tomcat 9.0.56 server we have defined a ActiveMQ resource that the tomcat creates when started. For this to work we copied activemq-all-5.16.3.jar to tomcat/lib folder, so it's available. However, we might not be interested in all the dependencies contained in activemq-all-5.16.3.jar and they might even cause some classpath issues with the individual webapps.

Obviously, we could decide to use the other activemq-client and activemq-broker .jars but lets say for this example we don't have that luxury.

Inside a .pom file we could have excluded the specific dependency we don't want, however when we copy the .jar to the lib folder I don't see how we can achieve this. In addition, it could be beneficial to see the dependency hierarchy in the tomcat/lib, I also don't see how this can be done.

So, are there any better ways of managing the third-party libs used by tomcat?

java

tomcat

0 Answers

Your Answer

Accepted video resources