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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 23:10:26  来源:igfitidea点击:

Is there a Maven repository for Spring 4?

javaspringmavenspring-4

提问by Nicolas Mommaerts

I'm looking for Spring 4.0 M1, for use with Java 8. According to thisissue there should be a build, can't find however. Ideally there would be a Maven repo, but I can't even find a regular download?

我正在寻找 Spring 4.0 M1,用于 Java 8。根据这个问题应该有一个构建,但是找不到。理想情况下会有一个 Maven 存储库,但我什至找不到常规下载?

采纳答案by Paul Gray

As of December 12, 2013, Spring 4.0.0.RELEASEis in Maven Central.

截至2013 年 12 月 12 日,Spring4.0.0.RELEASE在 Maven Central 中。

You can add this to your pom.xmlto 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 4is 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 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 日星期二发布