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