tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Again JarScanner and jarsToSkip
Date Wed, 04 Aug 2010 20:47:42 GMT
On 04/08/2010 12:54, Rainer Jung wrote:
> Hello everyone,
> 
> would it make sense to make jarsToSkip publicly available in the
> JarScanner interface and default impl, in order to allow to configure it
> per context as part of context.xml?
+1

> Is there one JarScanner instance per context?
Yes.

> If so: How would we want to merge default settings and per context
> settings? Some of the default exclusions we know for sure we want to
> exclude e.g. the stuff shipped with Tomcat. Others we can't say for sure
> for all the future, like the commons stuff. So it seems if we make it
> configurable per context and do not want people to have to include the
> Tomcat stuff in every context config, the default would need to be split
> in two parts, namely the always to exclude and the default per context
> which gets overwritten.
> 
> What about allowing to match against the full path of the jar, possibly
> implicitley prefixing all pattrns which do not start with a slash with
> "**/"? Does that make sense, i.e. is there a use case? The list now
> allows glob patterns like in ant, so "**", "*" and "?". E.g. we could
> add ${catalina.home}/lib/* and ${catalina.base}/lib/* to shortcut our
> own jar list. For the classpath jars it seems the jars are all coming
> from file URLs, so retrieving the full path is easy. Concerning the
> WEB-INF/lib jars, I didn't yet check.
> 
> Should we also add standard.jar and jstl.jar to the default exclude
> list? They are scanned as part of the examples webapp. Or do we think
> the names are to generic to add them to the list?
> 
> Is there any complication, because the JarScanner is also used for
> taglib scanning? There is an API to set "noTldJar", although I'm not
> sure whether that's available by config. Default is null which leads to
> again using jarsToSkip.

I'm happy to see all of this configuration completely re-written if that
is what is required. That said, this is just a start-up optimisation.

I think we need three groups:
a) never scan (JAR or TLD)
b) default jarsToSkip
c) default noTldJar

I'd suggest all three being set in catalina.properties with b) & c)
over-ridable per context. Users can over-ride the defaults in
catalina.properties if they wish.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message