Skip to content

Commit a61bd14

Browse files
committed
DATACMNS-687 - Added section on dependency management to reference docs.
Added a dedicated dependencies.adoc that outlines the usage of the Spring Data release train BOM as well as the way one would customize the release train to be used with Spring Boot. Also, we now explicitly list the Spring Framework version the release requires.
1 parent 1924aaf commit a61bd14

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

src/main/asciidoc/dependencies.adoc

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[[dependencies]]
2+
= Dependencies
3+
4+
Due to different inception dates of individual Spring Data modules, most of them carry different major and minor version numbers. The easiest way to find compatible ones is by relying on the Spring Data Release Train BOM we ship with the compatible versions defined. In a Maven project you'd declare this dependency in the `<dependencyManagement />` section of your POM:
5+
6+
.Using the Spring Data release train BOM
7+
====
8+
[source, xml]
9+
----
10+
<dependencyManagement>
11+
<dependencies>
12+
<dependency>
13+
<groupId>org.springframework.data</groupId>
14+
<artifactId>spring-data-releasetrain</artifactId>
15+
<version>${release-train}</version>
16+
<scope>import</scope>
17+
<type>pom</type>
18+
</dependency>
19+
<dependencies>
20+
</dependencyManagement>
21+
----
22+
====
23+
24+
The current release train version is {releasetrainVersion}. The train names are ascending alphabetically and currently available ones are listed https://github.com/spring-projects/spring-data-commons/wiki/Release-planning[here]. The version name follows the following pattern: `${name}-${release}` where release can be one of the following:
25+
26+
* `BUILD-SNAPSHOT` - current snapshots
27+
* `M1`, `M2` etc. - milestones
28+
* `RC1`, `RC2` etc. - release candidates
29+
* `RELEASE` - GA release
30+
* `SR1`, `SR2` etc. - service releases
31+
32+
A working example of using the BOMs can be found in our https://github.com/spring-projects/spring-data-examples/tree/master/bom[Spring Data examples repository].
33+
34+
If that's in place declare the Spring Data modules you'd like to use without a version in the `<dependencies />` block.
35+
36+
.Declaring a dependency to a Spring Data module
37+
====
38+
[source, xml]
39+
----
40+
<dependencies>
41+
<dependency>
42+
<groupId>org.springframework.data</groupId>
43+
<artifactId>spring-data-jpa</artifactId>
44+
</dependency>
45+
<dependencies>
46+
----
47+
====
48+
49+
[[dependencies.spring-boot]]
50+
== Dependency management with Spring Boot
51+
52+
Spring Boot already selects a very recent version of Spring Data modules for you. In case you want to upgrade to a newer version nonetheless, simply configure the property `spring-data-releasetrain.version` to the train name and iteration you'd like to use.
53+
54+
[[dependencies.spring-framework]]
55+
== Spring Framework
56+
57+
The current version of Spring Data modules require Spring Framework in version {springVersion} or better. The modules might also work with an older bugfix version of that minor version. However, using the most recent version within that generation is highly recommended.

src/main/asciidoc/index.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ include::preface.adoc[]
1717
= Reference documentation
1818

1919
:leveloffset: +1
20+
include::dependencies.adoc[]
2021
include::repositories.adoc[]
2122
include::auditing.adoc[]
2223
:leveloffset: -1

src/main/asciidoc/preface.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ The Spring Data Commons project applies core Spring concepts to the development
1010
* Bugtracker - https://jira.spring.io/browse/DATACMNS
1111
* Release repository - https://repo.spring.io/libs-release
1212
* Milestone repository - https://repo.spring.io/libs-milestone
13-
* Snapshot repository - https://repo.spring.io/libs-snapshot
13+
* Snapshot repository - https://repo.spring.io/libs-snapshot

0 commit comments

Comments
 (0)