Add support for exploded Boot archive in deployer

This commit is contained in:
Dave Syer
2018-09-22 11:17:14 +01:00
parent 8f9882a419
commit 7eb9d9f500
3 changed files with 236 additions and 101 deletions

View File

@@ -295,13 +295,19 @@ class FunctionCreatorConfiguration {
if (!"file".equals(url.getProtocol())) {
return Collections.singletonList(url);
}
if (!url.toString().endsWith(".jar")) {
return Collections.singletonList(url);
}
try {
File file = new File(url.toURI());
if (file.exists()) {
JarFileArchive archive = new JarFileArchive(file);
Archive archive;
if (!url.toString().endsWith(".jar")) {
if (!new File(file, "BOOT-INF").exists()) {
return Collections.singletonList(url);
}
archive = new ExplodedArchive(file);
}
else {
archive = new JarFileArchive(file);
}
return Arrays
.asList(new ComputeLauncher(archive).getClassLoaderUrls());
}