Changes required for #8334 extracted from PR #8346.
Comment From: malcolmp6
I am still not able to launch my spring boot app with this snapshot.
buildscript {
repositories {
jcenter()
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'http://repo.spring.io/milestone' }
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.0.0.BUILD-SNAPSHOT'
}
}
This is my java command -
java -Dloader.path=lib -Dloader.debug=true -jar build/libs/complete-0.1.0-boot.jar
where lib is a nested folder in complete-0.1.1-boot.jar and has all the dependent jars. I get a class not found exception.
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
Comment From: dsyer
It's not going to work with the layout you chose (the lib directory is possible, but having the application classes in the root of the archive is a really bad idea). Andy and I are discussing if we can make it work, but with the layout you have chosen it seems unlikely. It might be better to ask yourself if you need that layout, and why