-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Spring Framework Artifacts
This document describes how to access Spring Framework artifacts. For snippets of POM configuration go to Maven Central or Spring Repositories. For more in-depth information about Spring repositories see the Spring Artifactory page.
The Spring Framework is modular and publishes 20+ different jars:
spring-aop spring-context-indexer spring-instrument spring-orm spring-web
spring-aspects spring-context-support spring-jcl spring-oxm spring-webflux
spring-beans spring-core spring-jdbc spring-r2dbc spring-webmvc
spring-context spring-expression spring-jms spring-test spring-websocket
spring-messaging spring-tx
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.
The Spring Framework publishes GA (general availability) versions to Maven Central which is automatically searched when using Maven, so just add the dependencies to your project's POM:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.16</version>
</dependency>
Snapshot, milestone, and release candidate versions are published to an Artifactory instance hosted by JFrog. 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.
Add the following to resolve snapshot versions – for example, 5.3.17-SNAPSHOT
:
<repository>
<id>repository.spring.snapshot</id>
<name>Spring Snapshot Repository</name>
<url>https://repo.spring.io/snapshot</url>
</repository>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.17-SNAPSHOT</version>
</dependency>
Add the following to resolve milestone and RC versions – for example, 6.0.0-M2
or 6.0.0-RC1
:
<repository>
<id>repository.spring.milestone</id>
<name>Spring Milestone Repository</name>
<url>https://repo.spring.io/milestone</url>
</repository>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>6.0.0-M2</version>
</dependency>
You can also resolve GA versions of Spring Framework artifacts against https://repo.spring.io/release
.
For more in-depth information about Spring repositories, see the Spring Artifactory page.
If for whatever reason you are not using a build system with dependency management capabilities, you can download Spring Framework distribution zips from the Spring repository at https://repo.spring.io. These distributions contain all source and binary jar files, as well as Javadoc and reference documentation, but do not contain external dependencies!
To create a distribution with all dependencies locally you can build from source. See Build Zip with Dependencies for details.