Nexus 无法解决快照依赖性,但我可以在 nexus/content/groups/public 下找到它

发布于 2024-10-28 05:54:51 字数 864 浏览 3 评论 0原文

如果您遇到过这个问题,可以告诉我吗?我的 Nexus 安装不再可以找到内部存储库的快照。我在 nexus/content/groups/public 下面看到了相关快照的 jar,但是当我执行一个简单的 Maven 项目时,我收到了丢失的工件消息:

mvn clean package -U -s c:\sandbox\maven-settings.xml
...
Missing:
----------
1) com.bar:foo:jar:1.0.0-SNAPSHOT
Try downloading the file manually from the project website.

Nexus: 1.5.0 Open Source Edition

Mvn:2.2.1

“公共存储库”组包括第 3 方/外部快照和发布存储库,包括我的新 testsnap,其中仅包含 com.bar.foo:jar:1.0.0-SNAPSHOT。

“公共快照存储库”组包括 testsnap、我的内部快照存储库、apache 快照和 ibiblio

源处脱机

最近,我代理的两个内部快照/发布对在我没有清理过快照的 ,其中有 123 GB。我昨天刚刚完成了一项清理任务,转储了大约 100GB 的快照。我开始重新索引,它仍在处理中。

如果您对我可以检查的内容有任何想法,请告诉我。谢谢

Peter([电子邮件受保护]

can you let me know if you've seen this problem? My nexus install no longer can find snapshots for internal repositories. I see the jar for the snapshot in question below nexus/content/groups/public but when I execute a simple maven project I get the missing artifact message:

mvn clean package -U -s c:\sandbox\maven-settings.xml
...
Missing:
----------
1) com.bar:foo:jar:1.0.0-SNAPSHOT
Try downloading the file manually from the project website.

Nexus: 1.5.0 Open Source Edition

Mvn: 2.2.1

"Public Repositories" group includes 3rd party/external snapshot and release repositories including my new testsnap that only has com.bar.foo:jar:1.0.0-SNAPSHOT in it.

"Public Snapshot Repositories" group includes testsnap, my internal snapshots repo, apache snapshots and ibiblio

Recently, two internal snapshot/release pairs which I proxy were taken offline at the source

I haven't been cleaning SNAPSHOTS and had 123 GB of them. I just completed a cleanup task yesterday where I dumped about 100GB of snapshots. I started a reindex and it's still processing.

Please let me know if you have any ideas on what I can check. Thanks

Peter ([email protected])

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

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

发布评论

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

评论(1

神经大条 2024-11-04 05:54:51

这是一个关于假设的教训。问题不可能是我的maven-settings.xml,因为

  • 中都没有永远更改它
  • 我在所有其他构建工作

好吧,不是那么快...我的设置文件定义了一个nexus配置文件,其中nexus是除该部分之外的所有内容的镜像使该配置文件成为活动/默认配置文件丢失。

  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>

那么,为什么它在我的系统上运行?我有一个 hudson 负责处理所有构建,他们共享一个公共的本地 Maven 存储库。大多数构建都会直接访问第三方工件的源代码。由于所有 Hudson 作业都将工件部署到 Nexus,因此执行“安装”阶段,这意味着它们会播种本地 Maven 存储库。当需要内部快照的作业执行时,它会从本地 Maven 存储库中提取该快照。

所有这一切都很好,直到添加了一个仅运行某些作业的新奴隶。公共缓存在两者之间分开,瞧,找不到快照,因为构建不会连接来寻找依赖项(即使 mvn -X 输出如此报告......这很奇怪)

This was a lesson in assumptions. The problem couldn't have been my maven-settings.xml because

  • I haven't changed it in forever
  • all my other builds work

Well, not so fast... My settings file defined a nexus profile where nexus is mirrorOf all but the section to make that profile the active/default was missing.

  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>

So, why did it work on my system? I have one hudson handling all the builds and they share a common local maven repo. Most builds consuming 3rd party artifacts when directly to the source for them. Since all hudson jobs deploy artifacts to nexus the "install" phase is executed which means they seed the local maven repo. When a job requiring an internal snapshot executes it pulls it from the local maven repo.

All of this was fine until a new slave was added where only certain jobs ran. The common cache was split between the two and voila a snapshot cannot be found because the build isn't going to nexus to look for dependencies (even though the mvn -X output reported it as such ... which is weird)

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