Fix PropertiesLauncher for wildcard entries in parent classpath

This small change now plays nice with wildcard classpath
entries coming from a parent classloader as its urls.
This commit is contained in:
Janne Valkealahti 2013-12-31 10:08:17 +00:00 committed by Dave Syer
parent f448e79f29
commit da889efde7
1 changed files with 6 additions and 0 deletions

View File

@ -406,6 +406,12 @@ public class PropertiesLauncher extends Launcher {
if (url.toString().endsWith(".jar") || url.toString().endsWith(".zip")) {
lib.add(0, new JarFileArchive(new File(url.toURI())));
}
else if (url.toString().endsWith("/*")) {
String name = url.getFile();
lib.add(0,
new ExplodedArchive(new File(name.substring(0,
name.length() - 1))));
}
else {
lib.add(0, new ExplodedArchive(new File(url.getFile())));
}