一些 sonatype 关系问题

发布于 2024-09-04 06:58:11 字数 2383 浏览 10 评论 0原文

我在 LAN 内部署了一个 sonatype nexus 服务器,将一些远程存储库映射到我的公共存储库:

alt text http://img576.imageshack.us/img576/5517/7875d01884ad4234a5b02e2.png

第一个问题是,为什么这些存储库不与“真实”存储库同步? 例如,我将 Maven Central (http://repo1.maven.org/maven2) 映射到“ central" ,但是当我浏览 http://smallufo:8081/nexus/ content/repositories/central/org/springframework/ ,包不完整,在 http://repo2.maven.org/maven2/org/springframework/,有大量的工件,但我只有其中一些:

替代文本 http://img63.imageshack.us/img63/6163/31beec445d6b4e9eb96beba.png

而且版本很旧...... ex : spring-core 只有 2.5.6.SEC01 ,但最新版本是 3.0.2.RELEASE 。 而我的maven客户端似乎只能找到旧的工件...... 替代文本 http://img199.imageshack.us/img199/3872/maven.gif< /a>

“central”是代理目录,应该与远程服务器相同。我尝试“过期缓存”,“重新索引”,“增量重新索引”整个“中央”: 替代文本 http://img23.imageshack.us/img23/8467/391bd49409c94aa58640afe.png< /a>

经过很长一段时间几乎 100% java 进程负载后,情况似乎并没有好转,只是添加了一些工件...没有反映真正的“Maven Central”数据...

第二个问题,与“Expire Cache”有什么区别、“重新索引”、“增量重新索引”?

即使我可以“搜索” spring-core.3.0.2.RELEASE ,我的 m2eclipse 仍然找不到它: 替代文本 http://img217.imageshack.us/img217/9360/18c15abab4f343b0848a819.png< /a>

我还可以在“index”中看到 spring-core-3.0.2.RELEASE (但在“storage”中不可用): 替代文本 http://img268.imageshack.us/img268/7041/maven2.gif< /a>

但为什么 m2eclipse 不能使用它?看来 m2eclipse 只能在存储中安装工件,如果这就是 Nexus 的工作原理,我如何“强制”下载 spring-core-3.0.2.RELEASE 到 Nexus 的存储?

如何解决这些奇怪的不兼容问题? 多谢 !

-- 更新 --

看来是 m2eclipse 和 maven-3.0-beta1 的问题。

当我改回 maven 2.2.1 后,现在一切正常。

抱歉打扰了。

I deployed a sonatype nexus server inside my LAN , mapping some remote repositories to my public repositories :

alt text http://img576.imageshack.us/img576/5517/7875d01884ad4234a5b02e2.png

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 :

alt text http://img63.imageshack.us/img63/6163/31beec445d6b4e9eb96beba.png

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

"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

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...

Second question , what's difference with "Expire Cache" , "ReIndex" , "Incremental ReIndex" ?

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

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

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 !

-- updated --

It seems it is problem with m2eclipse and maven-3.0-beta1.

After I change back to maven 2.2.1 , everything works fine now.

Sorry for the disturbance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧人 2024-09-11 06:58:11

Nexus 仅缓存客户端请求的工件。因此,您需要设置项目 pom 来请求正确的版本。

Nexus only caches artifacts that clients have requested. So you need to set up your project poms to request the proper versions.

稳稳的幸福 2024-09-11 06:58:11

Nexus 仅代理构建所请求的内容,这就是为什么它在每个存储库的本地存储中没有完整副本的原因。相信我,无论如何你都不会想要这样的。您通常只需要很小的子集,例如 100gb 中央存储库。

您可以在此处阅读有关各种过期/重新索引等操作的详细信息: Nexus 计划任务

Nexus only proxies what the build has requested, that's why it doesn't have a full copy in the local storage of every repo. Trust me you wouldn't want that anyway. You typcially only need a very small subset of for example the 100gb Central repo.

You can read the details about the various Expire/Reindex etc operations here: Nexus Scheduled Tasks

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文