一些声纳关系问题 [英] Some sonatype nexus questions
问题描述
我在局域网内部署了一个sonatype nexus服务器,将一些远程存储库映射到我的公共存储库:
I deployed a sonatype nexus server inside my LAN , mapping some remote repositories to my public repositories :
替代文本http://img576.imageshack.us/img576/5517/7875d01884ad4234a5b02e2 .png
第一个问题是,为什么这些存储库不与真实"存储库同步? 例如,我将Maven Central( http://repo1.maven.org/maven2 映射为中央",但是当我浏览 http://smallufo:8081/nexus/内容/存储库/central/org/springframework/中,软件包不完整,位于 http://repo2.maven.org/maven2/org/springframework/,有很多工件,但是我只有其中一些:
First question is , why these repositories not sync with the "real" repositories ? For example , I mapped maven central (http://repo1.maven.org/maven2) to "central" , but when I browse http://smallufo:8081/nexus/content/repositories/central/org/springframework/ , the packages are not complete , in http://repo2.maven.org/maven2/org/springframework/ , there are tons of artifacts , but I only have some of them :
替代文本http://img63.imageshack.us/img63/6163/31beec445d6b4e9eb96beba .png
版本太旧了... 例如:spring-core仅为2.5.6.SEC01,但最新版本为3.0.2.RELEASE. 而且我的Maven客户似乎只能找到旧的工件... 替代文本http://img199.imageshack.us/img199/3872/maven.gif
And versions are old ... ex : spring-core is only 2.5.6.SEC01 , but the latest version is 3.0.2.RELEASE. And my maven client seems can only find the old artifacts ... alt text http://img199.imageshack.us/img199/3872/maven.gif
中央"是代理目录,它与远程服务器应该相同.我试图将"Expire Cache","ReIndex","Incremental ReIndex"整个中央": 替代文本http://img23.imageshack.us/img23/8467/391bd49409c94aa58640afe.png
"central" is a proxy directory , it should be the same with the remote server. I tried to "Expire Cache" , "ReIndex" , "Incremental ReIndex" the whole "central" : alt text http://img23.imageshack.us/img23/8467/391bd49409c94aa58640afe.png
在经过近100%的Java进程负载很长时间之后,情况似乎并没有改善,只是添加了一些工件...没有反映真实的"Maven Central"数据...
After a long time with almost 100% java process load , the situation seems not better , just add some artifacts ... not reflecting the real "Maven Central" data...
第二个问题,"Expire Cache","ReIndex","Incremental ReIndex"有什么区别?
Second question , what's difference with "Expire Cache" , "ReIndex" , "Incremental ReIndex" ?
即使我可以搜索" spring-core.3.0.2.RELEASE,我的m2eclipse仍然找不到它: 替代文字http://img217.imageshack.us/img217/9360/18c15abab4f343b0848a819.png
Even I can "search" spring-core.3.0.2.RELEASE , my m2eclipse still cannot find it : alt text http://img217.imageshack.us/img217/9360/18c15abab4f343b0848a819.png
我还可以在"index"中看到spring-core-3.0.2.RELEASE(但在"storage"中不可用): 替代文本http://img268.imageshack.us/img268/7041/maven2.gif
I can also see the spring-core-3.0.2.RELEASE in the "index" , (but not available in "storage") : alt text http://img268.imageshack.us/img268/7041/maven2.gif
但是为什么m2eclipse无法使用它?看来m2eclipse只能在存储中安装构件,如果这是nexus的工作方式,我如何强制"下载spring-core-3.0.2.RELEASE到nexus的存储中?
But why m2eclipse cannot make use of it ? it seems m2eclipse can only install artifacts in the storage , if this is how nexus works , how do I "force" download spring-core-3.0.2.RELEASE to nexus's storage ?
我该如何解决这些奇怪的不兼容问题? 非常感谢!
How do I solve these strange incompatibilities ? Thanks a lot !
-更新-
m2eclipse和maven-3.0-beta1似乎有问题.
It seems it is problem with m2eclipse and maven-3.0-beta1.
回到maven 2.2.1之后,现在一切正常.
After I change back to maven 2.2.1 , everything works fine now.
很抱歉打扰.
推荐答案
Nexus仅缓存客户端请求的工件.因此,您需要设置项目poms来请求正确的版本.
Nexus only caches artifacts that clients have requested. So you need to set up your project poms to request the proper versions.
这篇关于一些声纳关系问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!