On 2017-11-25 14:35, rich...@xentu.com wrote:
I've written a few jersey webapps, and each has about 20 jar files
included as Maven dependencies.
The inclusion of those jars increases the size of the resulting wars
by a factor of over 100. Uploading a war via 'Tomcat Web Application
Manager' takes several minutes, presumably due in part to the war
size.
Given that these webapps require the same set of jars in their
WEB-INF/lib/, I thought I could place them in say
C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib\jersey
where all webapps could find them.
In catalina.properties, I appended this new directory to the
common.loader list of paths:
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,
${catalina.base}/lib/jersey/*.jar
Then, in each jersey webapp, I'd modify pom.xml to exclude those files
from the war.
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
</configuration>
</plugin>
This approach seems to work.
So, the question I'm seeking advise on is this:
If I have a collection of jars that I want to keep on Tomcat, for some
but not all webapps, and those jars are not to be included in the
wars, is this an acceptable technique? Or is it going to land me in
trouble? Does the order of locations in common.loader matter?
Thanks for any advice
Richard
Ray & Nasry, thanks for your observations.
Seems like my approach, in my situation at least, isn't going to cause
me problems, so that's good.
I'm only deploying to one server & the only apps on it are ones I've
written, so I can take care of the versions of the jars involved.
Regards
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org