的Nexus将不会下载从中央文物(Nexus won't download artifact

2019-08-04 06:31发布

我刚刚安装的Nexus 2.2-01后面的企业代理。 Maven的工作时,我直接到中央回购,但是当我配置<mirror>%M2_HOME%\conf\settings.xml ,我不能做一个简单的mvn archetype:createmvn clean

从Nexus的网络界面,我可以:

  • 在中央“浏览远程”。
  • “浏览目录”
  • 和它说:“(不本地缓存)”中的“神器信息”选项卡,我可以下载的罐子
  • 再看看在“http://127.0.0.1:8081/nexus/content/groups/public/”和“\关系\ Sonatype的工作\关系\存储\中央” .jar和.jar.sha1文件

...但由于某些原因,它不下载.pom文件

2.2的Nexus带着中央预配置的代理库,我可以浏览索引并从Web UI手动下载文件 - 那么,为什么不会从Maven的工作吗?

我已经配置了与身份验证默认HTTP代理服务器设置的Nexus,但仍然得到错误,如:

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

Answer 1:

哎呀! DNS问题 - 在Maven settings.xml中使用的IP地址解决了这一问题。



Answer 2:

对方的回答是正确的,但只是为人们谁得到这里同样的问题,但上面的回答没有帮助注:检查您的settings.xml代理设置。



Answer 3:

我已经看到了这个错误今天和固定它回去到Maven 3.2.5(从3.3.9)的唯一的事情



文章来源: Nexus won't download artifacts from Central