-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Add property 'spring-boot.version' to dependency managements #9823
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Comments
There's no need for the |
Unfortunately you're wrong. I do use Boot's dependency management, but I also define my own - for the additional dependencies. And in this case I add: <dependencyManagement>
<dependencies>
...
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
...
</dependencies>
</dependencyManagement> This allows excluding If I do not specify
Maybe there is a better way to exclude |
Your original description didn't show that the dependency declarations were part of dependency management. That's quite a key detail here. Regardless, we will not be introducing a
That's really a Maven question, rather than a Spring Boot question. As mentioned in the guidelines for contributing and guidelines for support we prefer to use GitHub issues only for bugs and enhancements. |
I see - my exact case was discussed in scope of #5014 and current behavior was considered lesser evil. No problem, thanks! |
Dear Spring Boot team,
Thank you very much for this project - I use it much and it's really great.
I'd like to propose a minor improvement.
Use case:
Although logback is nice, I found that log4j2 is a little bit better in terms of configurations' flexibility.
To prevent error with "multiple SLF4J bindings" I need to exclude "spring-boot-starter-logging" from both "spring-boot-starter-actuator" and "spring-boot-starter-thymeleaf".
The cleanest way to achieve this (correct me if I'm wrong) is to add next block to my dependency management block ("version" tag is required by maven and cannot be omitted):
So if I had "spring-boot.version" variable defined in "spring-boot-dependencies" module, that would be a little bit cleaner in terms of future support. Otherwise, I have to maintain this variable myself and update both this value and parent's version (I extend "spring-boot-starter-parent") - not a big issue, obviously, but I'd prefer to avoid this.
What do you think? Does this make sense?
The text was updated successfully, but these errors were encountered: