Maven 的 Spring 在线存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/815713/
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
Spring online repository for Maven
提问by Fortyrunner
I've just installed Maven2 for the first time.
我刚刚第一次安装了 Maven2。
By default it pulls down a few useful jars into a local project: jakarta-commons, junit etc.
默认情况下,它会将一些有用的 jar 文件下拉到本地项目中:jakarta-commons、junit 等。
I wanted to pull in the latest Spring release (2.5.6 at the time of writing). But the online repositories I looked at (iBiblio and Maven) only had much older versions of Spring libraries.
我想引入最新的 Spring 版本(撰写本文时为 2.5.6)。但是我查看的在线存储库(iBiblio 和 Maven)只有更旧版本的 Spring 库。
Are there any other repositories that are kept up to date? What is the best practice here; can we maintain them ourselves? I would be prepared to help out maintaining this stuff!
是否有任何其他存储库保持最新?这里的最佳实践是什么?我们可以自己维护它们吗?我会准备帮助维护这些东西!
采纳答案by Blake Pettersson
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/springframework/spring-core/
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/springframework/spring-core/
It looks like spring 2.5.6 is present.
看起来春天 2.5.6 是存在的。
I would recommend adding Jboss's repo though, if you like using stuff such as hibernate. In my experience things gets updated there much quicker than in the main maven repo.
如果您喜欢使用诸如 hibernate 之类的东西,我建议添加 Jboss 的 repo。根据我的经验,那里的更新速度比主要的 Maven 存储库要快得多。
回答by Mauli
Actually I think you are way better of if you use the spring enterprise repository.
实际上,如果您使用 spring 企业存储库,我认为您会更好。
http://www.springsource.com/repository/
http://www.springsource.com/repository/
There is not only the spring distribution available, but also many other libraries, with correct dependencies to each other (which is not the case for the official maven repositories!). Further, it is also an OBR, so every library is also already an OSGI bundle!
不仅有可用的 spring 发行版,还有许多其他库,彼此之间具有正确的依赖关系(官方 maven 存储库不是这种情况!)。此外,它也是一个 OBR,所以每个库也已经是一个 OSGI 包!
<repository>
<id>com.springsource.repository.bundles.release
</id>
<name>SpringSource Enterprise Bundle Repository -
SpringSource Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/release
</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
<repository>
<id>com.springsource.repository.bundles.external
</id>
<name>SpringSource Enterprise Bundle Repository -
External Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/external
</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
<repository>
<id>com.springsource.repository.libraries.release
</id>
<name>SpringSource Enterprise Bundle Repository -
SpringSource Library Releases</name>
<url>http://repository.springsource.com/maven/libraries/release
</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
<repository>
<id>com.springsource.repository.libraries.external
</id>
<name>SpringSource Enterprise Bundle Repository -
External Library Releases</name>
<url>http://repository.springsource.com/maven/libraries/external
</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
回答by Iker Jimenez
Just follow this article: Obtaining Spring 3 Artifacts with Maven
只需关注这篇文章:使用 Maven 获取 Spring 3 Artifacts
回答by Jeff Caddel
Try this: https://s3browse.springsource.com/browse/repository.springsource.com/maven
试试这个:https: //s3browse.springsource.com/browse/repository.springsource.com/maven
The other url does not work because it is in reality an Amazon S3 "bucket" that is not easily readable for humans. Very easy for software though :)
另一个 url 不起作用,因为它实际上是一个 Amazon S3“存储桶”,人类不容易阅读。不过对于软件来说很容易:)
回答by Stevo Slavi?
Most should be on central, if not then Spring artifacts can be found at http://repo.springsource.orgwith specialized repositories:
大多数应该在中央,如果不是,那么可以在http://repo.springsource.org上找到带有专门存储库的Spring 工件:
- for releases: http://repo.springsource.org/libs-release-s3
- for milestones: http://repo.springsource.org/libs-milestone-s3
- for snapshots: http://repo.springsource.org/libs-snapshot-s3

