Skip to content

Commit 51c403b

Browse files
author
Phillip Webb
committed
Document how to customize dependency versions
Add a section to the "how-to" on customizing third-party dependency versions when using Maven. Fixes gh-434
1 parent b5b2fd2 commit 51c403b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,26 @@ would only ever be a development time trick probably).
12331233

12341234

12351235

1236+
[[howto-customize-dependency-versions-with-maven]]
1237+
=== Customize dependency versions with Maven
1238+
If you use a Maven build that inherits from `spring-boot-starter-parent` but you want
1239+
to override a specific third-party dependency you can add appropriate `<properties>`
1240+
elements. Browse the {github-code}/spring-boot-dependencies/pom.xml[`spring-dependencies`]
1241+
POM for a complete list of properties. For example, to pick a different `slf4j` version
1242+
you would add the following:
1243+
1244+
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
1245+
----
1246+
<properties>
1247+
<slf4j.version>1.7.5<slf4j.version>
1248+
</properties>
1249+
----
1250+
1251+
WARNING: Each Spring Boot release is designed and tested against a specific set of
1252+
third-party dependencies. Overriding versions may cause compatibilty issues.
1253+
1254+
1255+
12361256
[[howto-build-an-executable-archive-with-ant]]
12371257
=== Build an executable archive with Ant
12381258
To build with Ant you need to grab dependencies, compile and then create a jar or war

0 commit comments

Comments
 (0)