80.3 Customize dependency versions

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 spring-boot-dependencies POM for a complete list of properties. For example, to pick a different slf4j version you would add the following:

<properties>
    <slf4j.version>1.7.5<slf4j.version>
</properties>
[Note] 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 &lt;scope&gt;import&lt;/scope&gt; you have to redefine the artifact yourself instead of overriding the property.
[Warning] Warning
Each Spring Boot release is designed and tested against a specific set of third-party dependencies. Overriding versions may cause compatibility issues.

To override dependency versions in Gradle, you can specify a version as shown below:

ext['slf4j.version'] = '1.7.5'

For additional information, please refer to the Gradle Dependency Management Plugin documentation.

results matching ""

    No results matching ""