https://issues.apache.org/bugzilla/show_bug.cgi?id=52853
--- Comment #19 from Mark Thomas <ma...@apache.org> --- 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 updated. -- You are receiving this mail because: You are the assignee for the bug.