Uber jar created by spring-boot-maven-plugin sometimes requires that the application depends on spring-framework.
-
PropertiesLauncher imports Assert from spring-framework, and can sometimes fail.
-
JarModeLauncher imports two spring-framework classes, and always fails. This means layered jar cannot be used without spring-framework.
It is perhaps reasonable to assume that spring-boot-maven-plugin is used only in spring-boot apps which should have spring-framework on the classpath. Nonetheless, it'd be nice to eliminate these dependencies so that the plugin can be used for non-spring apps too.
Comment From: wilkinsona
Thanks for the suggestion, but we're happy with spring-core
being required here. JarModeLauncher
in particular would add quite a bit of extra complexity without spring-core
as it uses SpringFactoriesLoader
.
Comment From: wilkinsona
On second thought, let's consider this for PropertiesLauncher
. It has no dependency on spring-core in 2.1 (and earlier I believe). The use of Assert
was introduced in this commit.
Comment From: philwebb
+1 for updating PropertiesLauncher
. The JarModeLauncher
was an intentional design decision since we wanted to lean on spring.factories
.