java Spring 4 是否有 Maven 存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16506508/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a Maven repository for Spring 4?
提问by Nicolas Mommaerts
采纳答案by Paul Gray
As of December 12, 2013, Spring 4.0.0.RELEASE
is in Maven Central.
截至2013 年 12 月 12 日,Spring4.0.0.RELEASE
在 Maven Central 中。
You can add this to your pom.xml
to bring it in:
您可以将此添加到您的pom.xml
以将其引入:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
回答by Petr Mensik
Quoting Paul Grays answer - Spring 4
is already in Maven central so you just need to add this dependency
引用 Paul Grays 的回答 -Spring 4
已经在 Maven 中心,所以你只需要添加这个依赖项
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
Older asnwer
较早的回答
I think you need to add Spring repository to your pom.xml
我认为您需要将 Spring 存储库添加到您的 pom.xml
<repository>
<id>com.springsource.repository.maven.snapshot</id>
<url>http://maven.springframework.org/snapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Then you can add your Spring module with following version 4.0.0.BUILD-SNAPSHOT
. So for example
然后您可以添加具有以下版本的 Spring 模块4.0.0.BUILD-SNAPSHOT
。所以例如
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>4.0.0.BUILD-SNAPSHOT</version>
</dependency>
回答by Johan Frick
It is now released, so it can be found in standard repo: http://search.maven.org/#artifactdetails%7Corg.springframework%7Cspring-framework-bom%7C4.0.0.RELEASE%7Cpom
它现已发布,因此可以在标准 repo 中找到:http: //search.maven.org/#artifactdetails%7Corg.springframework%7Cspring-framework-bom%7C4.0.0.RELEASE%7Cpom
回答by javadeveloper
When I look at the Spring Framework summary pageit states that 4.0 M1 is not released yet - it is scheduled for Tuesday, 2013-05-14
当我查看 Spring Framework摘要页面时,它指出 4.0 M1 尚未发布 - 计划于 2013 年 5 月 14 日星期二发布