I am working on Spring cloud contract documentation and I have seen a comment in dependency from Spring cloud documentation and would like to know what exactly is this <!-- If you're adding this dependency explicitly you have to
add it *BEFORE* the Release Train BOM-->
A BOM is the acronym for Bill of Materials: for your features, you need other projects, each of them with different versions. With a bom you get a list of compatible/tested/needed versions of such projects, all in one place.
As explained in spring-data, a release train is a BOM with a name instead of a version (to avoid confusions) and the names are ordered alphabetically.
If you want to override one of the versions written in the release train, you have to put that explicit dependency before the release train itself. So in the doc you linked, it is saying, if you want to use the version 2.0.0.RC2 of the artifact spring-cloud-contract-dependencies, put it (for example) before:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.RC1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
because the Finchley.RC1 includes a different version of that dependency (in this case 2.0.0.RC1).
Please read the docs: https://projects.spring.io/spring-cloud/ . If you go to Quick Start
you'll see
The release train label (see below) currently used in at least two artifact: "spring-data" and "spring-cloud-dependencies" (most of the others have normal numeric release labels tied to their parent project). The dependencies POM is the one you can use as a BOM for dependency management. Example using the latest version with the config client and eureka (change the artifact ids to pull in other starters):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With