tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 52853] @HandlesTypes not resolving classes when added as repository directory
Date Sun, 06 May 2012 22:25:11 GMT

--- Comment #19 from Mark Thomas <> ---
You could have simplified this to just the raw elements without any of the
Spring libraries. Hey ho.

I have tracked down what is going on. There are two parts to this.

First of all this is never going to work unless (as per my remarks in comment
#1) you enabled directory scanning. Your testStartInternalForClassesDirectory()
method is missing the following line to do this:
((StandardJarScanner) context.getJarScanner()).setScanAllDirectories(true);

Second, there is a subtlety to the Jar scanner that isn't clear in the docs and
needs to be made clearer. A directory is only scanned (even if
scanAllDirectories==true) if it is an expanded JAR file. Tomcat determines this
by looking for a META-INF directory. If that doesn't exist, it isn't scanned.
Therefore, you also need to create a directory "/target/classes/main/META_INF"

With those two changes, you'll see the behaviour you expect. The bug here is in
the documentation that does not make that crystal clear. I'll get the docs

You are receiving this mail because:
You are the assignee for the bug.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message