From 593d180cf32cdde23004955aaecc1938dc7c83f7 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 5 Jun 2014 16:37:35 +0200 Subject: [PATCH] Add a note regarding dependency overriding Fixes gh-958 --- spring-boot-docs/src/main/asciidoc/howto.adoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 0e0957ae8b..e77ab487e2 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -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 `` -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 `` 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: ---- +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 `import` 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.