我刚刚在公司代理后面安装了 Nexus 2.2-01。当我直接访问 Central 存储库时,Maven 正在工作,但是当我配置<mirror>
in时,%M2_HOME%\conf\settings.xml
我无法执行简单的mvn archetype:create
or mvn clean
.
从 Nexus Web UI 我可以:
- 中环的“远程浏览”。
- “浏览索引”
- 并从显示“(未本地缓存)”的“工件信息”选项卡中,我可以下载罐子
- 然后在“http://127.0.0.1:8081/nexus/content/groups/public/”和“\nexus\sonatype-work\nexus\storage\central”查看 .jar 和 .jar.sha1 文件
...但由于某种原因它不下载.pom
文件
Nexus 2.2 带有一个预先配置的 Central 代理存储库,我可以从 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.