Skip to content

PropertiesLauncher requires spring-core on the classpath #23474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maxxedev opened this issue Sep 23, 2020 · 3 comments
Closed

PropertiesLauncher requires spring-core on the classpath #23474

maxxedev opened this issue Sep 23, 2020 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@maxxedev
Copy link

Uber jar created by spring-boot-maven-plugin sometimes requires that the application depends on spring-framework.

  1. PropertiesLauncher imports Assert from spring-framework, and can sometimes fail.

  2. 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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 23, 2020
@wilkinsona
Copy link
Member

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.

@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 24, 2020
@wilkinsona
Copy link
Member

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.

@wilkinsona wilkinsona added for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged and removed status: declined A suggestion or change that we don't feel we should currently apply labels Sep 24, 2020
@wilkinsona wilkinsona reopened this Sep 24, 2020
@philwebb
Copy link
Member

+1 for updating PropertiesLauncher. The JarModeLauncher was an intentional design decision since we wanted to lean on spring.factories.

@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 25, 2020
@philwebb philwebb added this to the 2.1.x milestone Sep 25, 2020
@philwebb philwebb changed the title uber jar and layering require spring-framework on classpath Allow PropertiesLauncher to run without spring-framework on the classpath Sep 25, 2020
@wilkinsona wilkinsona changed the title Allow PropertiesLauncher to run without spring-framework on the classpath PropertiesLauncher requires spring-core on the classpath Sep 25, 2020
@philwebb philwebb removed the for: team-attention An issue we'd like other members of the team to review label Sep 25, 2020
@wilkinsona wilkinsona modified the milestones: 2.1.x, 2.2.x Sep 26, 2020
@wilkinsona wilkinsona self-assigned this Sep 26, 2020
@wilkinsona wilkinsona modified the milestones: 2.2.x, 2.2.11 Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants