Skip to content
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

Exclude commons-logging from managed dependencies #37890

Open
sdeleuze opened this issue Oct 16, 2023 · 4 comments
Open

Exclude commons-logging from managed dependencies #37890

sdeleuze opened this issue Oct 16, 2023 · 4 comments
Labels
type: enhancement A general enhancement
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Oct 16, 2023

Related to spring-projects/spring-framework#31322, it looks like org.apache.httpcomponents:httpclient has a transitive dependency on commons-logging:commons-logging which is a dependency that creates conflicts with Spring Framework own implementation, and even worse that breaks the native compilation (see for details on spring-projects/spring-framework#30575).

Discussing with @snicoll about that, we were wondering if it could be possible for Spring Boot dependency management to exclude commons-logging:commons-logging transitive dependency from the managed dependencies like org.apache.httpcomponents:httpclient (and potentially other ones).

@snicoll
Copy link
Member

snicoll commented Oct 16, 2023

I also wonder if commons-logging could be a "banned dependency". I know the build has such capability so that we make sure only spring-jcl remains on the classpath for an app that uses our dependency management.

@wilkinsona
Copy link
Member

wilkinsona commented Oct 16, 2023

Boot's own build bans commons-logging:commons-logging. We could do that for apps in Boot's Gradle plugin or we could go one better and automatically configure a dependency substitution so that org.springframework:spring-jcl is used in place of commons-logging:commons-logging.

I'm not sure there's much we can do for Maven. Could we add some configuration for the Enforcer plugin to spring-boot-starter-parent perhaps?

@philwebb
Copy link
Member

I'm not sure we should try to configure the enforcer plugin but perhaps we can use our own plugin to check there isn't a commons-logging dependency.

@philwebb philwebb changed the title Exclude commons-logging:commons-logging from managed dependencies Exclude commons-logging from managed dependencies Oct 16, 2023
@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Oct 16, 2023
@snicoll
Copy link
Member

snicoll commented Oct 17, 2023

I am not a big fan of having the enforcer plugin configured in the parent either. The route of using our own plugin sounds really interesting!

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged for: team-meeting An issue we'd like to discuss as a team to make progress labels Oct 18, 2023
@philwebb philwebb added this to the 3.x milestone Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants