mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
add support for having a WAR classpath entry in the classpath
This commit is contained in:
1 parent
d8ac8e1694
commit
26a8af8c5b
1 file changed
+4
-1
@@ -87,7 +87,7 @@ public class XmlConfigLoader {
|
||||
if (classPath.isDirectory()) {
|
||||
checkDir(searchFor, xmlList, classPath);
|
||||
|
||||
} else if (classPath.getName().endsWith(".jar") || classPath.getName().endsWith(".war")) {
|
||||
} else if (classPath.getName().endsWith(".jar") || classPath.getName().endsWith(".war") || classPath.getName().endsWith(".war!/WEB-INF/classes")) {
|
||||
checkJar(searchFor, xmlList, classPath);
|
||||
|
||||
} else {
|
||||
@@ -152,6 +152,9 @@ public class XmlConfigLoader {
|
||||
if (fileName.toLowerCase().startsWith("surefire")){
|
||||
return;
|
||||
}
|
||||
if (classPath.getAbsolutePath().endsWith(".war!/WEB-INF/classes")) {
|
||||
classPath = new File(classPath.getAbsolutePath().substring(0, classPath.getAbsolutePath().lastIndexOf('!')));
|
||||
}
|
||||
JarFile module = null;
|
||||
try {
|
||||
module = new JarFile(classPath);
|
||||
|
||||
Reference in new issue
Block a user