diff --git a/spring-boot-integration-tests/spring-boot-integration-tests-embedded-servlet-container/pom.xml b/spring-boot-integration-tests/spring-boot-integration-tests-embedded-servlet-container/pom.xml
index 25264ca0688..59fb0a5da63 100644
--- a/spring-boot-integration-tests/spring-boot-integration-tests-embedded-servlet-container/pom.xml
+++ b/spring-boot-integration-tests/spring-boot-integration-tests-embedded-servlet-container/pom.xml
@@ -63,26 +63,4 @@
-
-
- java9
-
- 9
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- **/EmbeddedServletContainerJarDevelopmentIntegrationTests.java
- **/EmbeddedServletContainerWarDevelopmentIntegrationTests.java
-
-
-
-
-
-
-
diff --git a/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/StaticResourceJars.java b/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/StaticResourceJars.java
index 618649051e0..304b2557988 100644
--- a/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/StaticResourceJars.java
+++ b/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/StaticResourceJars.java
@@ -18,7 +18,9 @@ package org.springframework.boot.web.servlet.server;
import java.io.File;
import java.io.IOException;
+import java.lang.management.ManagementFactory;
import java.net.JarURLConnection;
+import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLConnection;
@@ -43,9 +45,25 @@ class StaticResourceJars {
addUrl(urls, url);
}
}
+ else {
+ for (String entry : ManagementFactory.getRuntimeMXBean().getClassPath()
+ .split(File.pathSeparator)) {
+ addUrl(urls, toUrl(entry));
+ }
+ }
return urls;
}
+ private URL toUrl(String classPathEntry) {
+ try {
+ return new File(classPathEntry).toURI().toURL();
+ }
+ catch (MalformedURLException ex) {
+ throw new IllegalArgumentException(
+ "URL could not be created from '" + classPathEntry + "'", ex);
+ }
+ }
+
private void addUrl(List urls, URL url) {
try {
if ("file".equals(url.getProtocol())) {