From 077b318eed1ca32854ae32011e7fa0376e8883c4 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 7 Jul 2023 11:33:44 +0200 Subject: [PATCH] Revise to cover Gradle usage as well --- Spring-Framework-Artifacts.md | 64 ++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 9 deletions(-) diff --git a/Spring-Framework-Artifacts.md b/Spring-Framework-Artifacts.md index b8885ee..634a322 100644 --- a/Spring-Framework-Artifacts.md +++ b/Spring-Framework-Artifacts.md @@ -12,27 +12,37 @@ spring-context spring-expression spring-jms spring-test spring- Some modules are interdependent. For example `spring-context` depends on `spring-beans` which in turn depends on `spring-core`. There are no required external dependencies although each module has optional dependencies and some of those may be required depending on what functionality the application needs. -There is no one "spring-all" jar that includes all sources. +There is no single "spring-all" jar that includes all modules. ## Maven Central -The Spring Framework publishes GA (general availability) versions to [Maven Central](https://central.sonatype.com/) which is automatically searched when using Maven, so just add the dependencies to your project's POM: +The Spring Framework publishes GA (general availability) versions to [Maven Central](https://central.sonatype.com/) which is automatically searched when using Maven or Gradle, so just add the dependencies to your project's build script: + +### Maven ```xml org.springframework spring-context - 5.3.16 + 6.0.10 ``` +### Gradle + +```groovy +implementation 'org.springframework:spring-context:6.0.10' +``` + ## Spring Repositories Snapshot, milestone, and release candidate versions are published to an [Artifactory](https://www.jfrog.com/artifactory/) instance hosted by [JFrog](https://www.jfrog.com). You can use the Web UI at https://repo.spring.io to browse the Spring Artifactory, or go directly to one of the repositories listed below. ### Snapshots -Add the following to resolve snapshot versions – for example, `5.3.17-SNAPSHOT`: +Add the following to resolve snapshot versions – for example, `6.1.0-SNAPSHOT`: + +#### Maven ```xml @@ -46,13 +56,32 @@ Add the following to resolve snapshot versions – for example, `5.3.17-SNAPSHOT org.springframework spring-context - 5.3.17-SNAPSHOT + 6.1.0-SNAPSHOT ``` +#### Gradle + +```groovy +repositories { + mavenCentral() + maven { + url "https://repo.spring.io/snapshot" + } +} + +... + +dependencies { + implementation 'org.springframework:spring-context:6.1.0-SNAPSHOT' +} +``` + ### Milestones and Release Candidates -Add the following to resolve milestone and RC versions – for example, `6.0.0-M2` or `6.0.0-RC1`: +Add the following to resolve milestone and RC versions – for example, `6.1.0-M2` or `6.1.0-RC1`: + +#### Maven ```xml @@ -66,13 +95,30 @@ Add the following to resolve milestone and RC versions – for example, `6.0.0-M org.springframework spring-context - 6.0.0-M2 + 6.1.0-M2 ``` -### Releases +#### Gradle + +```groovy +repositories { + mavenCentral() + maven { + url "https://repo.spring.io/milestone" + } +} + +... + +dependencies { + implementation 'org.springframework:spring-context:6.1.0-M2' +} +``` + +### GA Releases -You can also resolve GA versions of Spring Framework artifacts against `https://repo.spring.io/release`. +You can also obtain GA versions of Spring Framework artifacts from https://repo.spring.io/release. For more in-depth information about Spring repositories, see the [[Spring Artifactory]] page.