Reputation: 10418
Im using maven with tomcat7-maven plugin and its working quite well. Recently I noticed a message saying
At least one JAR was scanned for TLDs yet contained no TLDs.
Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them.
So I did some reasearch and realised I need to set the jarsToSkip property for the jars that dont contain TLDs. I have been looking into how to find which jars it is that is causing the problem but with little luck it seams tomcat7-maven-plugin is nott passing my loggersettings that are required for output of names of the jars.
Also I do not know where I set the jarsToSkip property when I have found the jars.
Any help would be appreciated.
Upvotes: 3
Views: 2810
Reputation: 1066
There is this open bug @ https://github.com/psi-probe/psi-probe/issues/348
Just pointing out.
Upvotes: 0
Reputation: 49095
There seems to be a bug with the maven tomcat plugin prior to 2.2 (ie 2.0) where the <systemProperties>
don't seem to be propagated. Also in 2.2
a config option called<jarScanAllDirectories>
was added which seems to improve performance even more (I think it ignores WEB-INF/classes).
Ignoring port and path I found the following configuration to greatly improve Maven Tomcat performance.
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>9090</port>
<path>/</path>
<jarScanAllDirectories>false</jarScanAllDirectories>
<systemProperties>
<org.apache.catalina.startup.ContextConfig.jarsToSkip>*.jar</org.apache.catalina.startup.ContextConfig.jarsToSkip>
<tomcat.util.scan.DefaultJarScanner.jarsToSkip>*.jar</tomcat.util.scan.DefaultJarScanner.jarsToSkip>
</systemProperties>
</configuration>
</plugin>
Upvotes: 0
Reputation: 9480
When using the Tomcat 7 Maven Plugin, anything you would otherwise have put in catalina.properties can go in your plugin config. i.e.
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<useTestClasspath>true</useTestClasspath>
<path>/</path>
<systemProperties>
<tomcat.util.scan.DefaultJarScanner.jarsToSkip>
myjar.jar
</tomcat.util.scan.DefaultJarScanner.jarsToSkip>
</systemProperties>
</configuration>
</plugin>
Upvotes: 3
Reputation: 5663
Believe the property jarsToSkip is a "catalina.properties" entry. Where ever your Tomcat conf folder is look at file "catalina.properties" and you should see a property like this around line 90 or so:
tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
You should be able to add jars to that list to prevent them from being scanned.
As far as finding which jars are causing the issues, that would be a little more difficult to determine. Probably some trial and error work to be done there.
Upvotes: 3