Nexus 团体订购
我们使用 Nexus 作为存储库管理系统。然而,我们在管理团队方面遇到了问题。
基本上,我们有一个快照版本化工件,位于两个存储库中。我们按照我们希望 Nexus 搜索它们的顺序将这两个存储库添加到同一组中。这是根据文档: http:// /www.sonatype.com/books/nexus-book/reference/config-sect-managing-groups.html
group
...
--> repo1
...
--> com.test.example-1.0.0-SNAPSHOT
...
--> repo2
...
--> com.test.example-1.0.0-SNAPSHOT
...
...
因此,通过将 repo1 排序在 repo2 之上,我们总是希望从 repo1 下载示例工件。然而,我们在现实中发现,尽管有订购,我们总是从任一存储库下载最新的快照版本。因此,如果 repo2 有更新的快照版本,我们会将其删除。
还有其他人看到过这种行为吗? Nexus 不考虑快照存储库的排序吗?
We are using nexus as a repository management system. However we are encountering a problem in regards to managing our groups.
Basically we have an snapshot versioned artifact that lives in two repositories. We add both these repositories to the same group in the order that we would like nexus to search them. This is in accordance with the documentation: http://www.sonatype.com/books/nexus-book/reference/config-sect-managing-groups.html
group
...
--> repo1
...
--> com.test.example-1.0.0-SNAPSHOT
...
--> repo2
...
--> com.test.example-1.0.0-SNAPSHOT
...
...
So by ordering repo1 above repo2 we always want to download the example artifact from repo1. What we find in reality however is that despite the ordering, we always download the latest snapshot version from either repo. So if repo2 has a more recent snapshot version we are pulling it down.
Has anyone else seen this behaviour? Does nexus not take ordering into account with snapshot repositories?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这实际上不是 Nexus,而是 Maven 执行的,会发生什么:
内容在这里让 Nexus 从 Maven 中“隐藏”东西就是路由规则。添加一条规则,使给定的 groupId、artifactId 或其他内容(实际上是正则表达式)仅从 repo1 提供服务。
This is actually not Nexus but Maven that does it, what happens:
What you can do here to make Nexus "hide" stuff from Maven is Routing rules. Add a rule that for given groupId, or artifactId or whatever (it's actually a regexp) serve only from repo1.