mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Add a note regarding dependency overriding
Fixes gh-958
This commit is contained in:
parent
563b70ded6
commit
593d180cf3
@ -1446,9 +1446,10 @@ would only ever be a development time trick probably).
|
||||
|
||||
[[howto-customize-dependency-versions-with-maven]]
|
||||
=== Customize dependency versions with Maven
|
||||
If you use a Maven build that inherits from `spring-boot-starter-parent` but you want
|
||||
to override a specific third-party dependency you can add appropriate `<properties>`
|
||||
elements. Browse the {github-code}/spring-boot-dependencies/pom.xml[`spring-dependencies`]
|
||||
If you use a Maven build that inherits directly or indirectly from `spring-boot-dependencies`
|
||||
(for instance `spring-boot-starter-parent`) but you want to override a specific
|
||||
third-party dependency you can add appropriate `<properties>` elements. Browse
|
||||
the {github-code}/spring-boot-dependencies/pom.xml[`spring-boot-dependencies`]
|
||||
POM for a complete list of properties. For example, to pick a different `slf4j` version
|
||||
you would add the following:
|
||||
|
||||
@ -1459,6 +1460,11 @@ you would add the following:
|
||||
</properties>
|
||||
----
|
||||
|
||||
NOTE: this only works if your Maven project inherits (directly or indirectly) from
|
||||
`spring-boot-dependencies`. If you have added `spring-boot-dependencies` in your
|
||||
own `dependencyManagement` section with `<scope>import</scope>` you have to redefine
|
||||
the artifact yourself instead of overriding the property .
|
||||
|
||||
WARNING: Each Spring Boot release is designed and tested against a specific set of
|
||||
third-party dependencies. Overriding versions may cause compatibility issues.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user