提问者:小点点

Nexus不会从中央下载神器


我刚刚在一个公司代理后面安装了Nexus 2.2-01。当我直接进入中央回购协议时,Maven正在工作,但当我配置

通过Nexus web UI,我可以:

  • 中环的“浏览远程”
  • “浏览索引”
  • 从“工件信息”选项卡上,我可以下载JAR(非本地缓存)
  • 然后去看电影。罐子和瓶子。罐子sha1文件位于“http://127.0.0.1:8081/nexus/content/groups/public/以及“\nexus\sonatype work\nexus\storage\central”

...但是由于某些原因,它没有下载。pom文件

Nexus 2.2附带了一个用于中央预配置的代理存储库,我可以从web UI手动浏览索引和下载文件——那么为什么它不能在Maven上运行呢?

我已将Nexus配置为具有身份验证的默认HTTP代理设置,但仍会出现以下错误:

[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 
  or one of its dependencies could not be resolved: 
  Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: 
  Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to nexus 
  (http://myserver:8081/nexus/content/groups/public): 
  Failed to transfer file: 
  http://myserver:8081/nexus/content/groups/public/
  org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom. 
  Return code is: 504, ReasonPhrase:Gateway Timeout. -> [Help 1]

[INFO] Scanning for projects...
Downloading: http://myserver:8081/nexus/content/groups/public/
  org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[WARNING] Failed to retrieve plugin descriptor for 
  org.apache.maven.plugins:maven-clean-plugin:2.4.1: 
  Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 
  or one of its dependencies could not be resolved: 
  Failed to read artifact descriptor for 
  org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1
Downloading: http://myserver:8081/nexus/content/groups/public/
  org/codehaus/mojo/maven-metadata.xml
Downloading: http://myserver:8081/nexus/content/groups/public/
  org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml
  from/to nexus (http://myserver:8081/nexus/content/groups/public): 
  Failed to transfer file: http://myserver:8081/nexus/content/groups/public/org/
  apache/maven/plugins/maven-metadata.xml. 
  Return code is: 504, ReasonPhrase:Gateway Timeout.

共3个答案

匿名用户

啊!DNS问题-使用maven设置中的IP地址。xml解决了这个问题。

匿名用户

另一个答案是正确的,但只是给那些遇到同样问题但上面的答案没有帮助的人一个提示:检查你的设置。xml代理设置。

匿名用户

我今天看到了这个错误,唯一修复它的是maven 3.2.5(从3.3.9开始)