Nexus仅从中央存储库而不是JAR下载POM [英] Nexus only downloading POMs from central repository rather than JARs

查看:186
本文介绍了Nexus仅从中央存储库而不是JAR下载POM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Nexus(版本2.6.2-01)上遇到了一个非常奇怪的问题.我曾尝试启用/禁用远程索引,但仍然遇到相同的问题.我已经运行了maven-release-plugin,并尝试下载此插件的依赖项时,它因错误而失败

I am having a really strange problem with Nexus (version 2.6.2-01). I have tried enabling/disabling remote indexes but I am still running into the same problem. I have running the maven-release-plugin and whilst trying to download the dependencies of this plugin, it fails with the error

在联系中找不到工件org.codehaus.groovy:groovy-all:jar:1.7.6

Could not find artifact org.codehaus.groovy:groovy-all:jar:1.7.6 in nexus

我以前在org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2上遇到相同的错误,我不得不使用Browse Storage手动将其删除,然后尝试再次运行发布插件以获取它可以正确下载工件.

I previously got the same error with org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2 and I had to manually delete it using Browse Storage and then try to run the release plugin again to get it to download the artifact properly.

如果我在nexus的中央存储库上浏览Remote,它显示了工件的完整内容,但是,如果我浏览Index,则缺少groovy-all 1.7.6的jar,如果我执行常规操作,这是相同的搜索groovy-all 1.7.6.

If I Browse Remote on the central repo in nexus, it shows the complete contents of the artifact, however if I Browse Index, the jar for groovy-all 1.7.6 is missing, this is the same if I do a general search for groovy-all 1.7.6.

我的设置xml是按照Nexus的存储库管理中的建议配置的,即

My settings xml is configured as suggested in the Repository Management with Nexus book, i.e.

<mirror>
    <id>nexus</id>
    <mirrorOf>*</mirrorOf>
    <name>Nexus Public Repository Group</name>
    <url>http://localhost:8081/nexus/content/groups/public</url>
</mirror>

 <profile>
  <id>nexus</id>
  <!--Enable snapshots for the built in central repo to direct -->
  <!--all requests to nexus via the mirror -->
  <repositories>
    <repository>
      <id>central</id>
      <url>http://central</url>
      <releases><enabled>true</enabled></releases>
      <snapshots><enabled>true</enabled></snapshots>
    </repository>
  </repositories>
 <pluginRepositories>
    <pluginRepository>
      <id>central</id>
      <url>http://central</url>
      <releases><enabled>true</enabled></releases>
      <snapshots><enabled>true</enabled></snapshots>
    </pluginRepository>
  </pluginRepositories>
</profile>

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

这真的很烦人,因为我希望Nexus要下载时需要中央提供的工件!

This is getting really annoying as I expect Nexus to download require artifacts from central!

谢谢

推荐答案

您的本地存储库可能已缓存未找到工件的事实.运行需要所有常规操作的项目构建并强制使用

Your local repository has probably cached the fact that the artifact was not found. Run a build of your project that requires groovy-all and force updates with

   mvn clean install -U

那应该下载jar并通过.

That should download the jar and pass.

索引也与下载的内容完全无关.它仅用于搜索.

Also index has nothing to do with what gets downloaded at all. It is just used for searches.

这篇关于Nexus仅从中央存储库而不是JAR下载POM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆