我剛剛將Nexus 2.2-01安裝在公司代理之後。當我直接進入中央倉庫時,Maven正在工作,但是當我配置<mirror>
的%M2_HOME%\conf\settings.xml
時,我無法執行簡單的mvn archetype:create
或mvn clean
。Nexus不會從中央下載文物
從Nexus的網絡界面,我可以:
- 在中央 「瀏覽遠程」。
- 「瀏覽目錄」
- 和它說:「(不本地緩存)」中的「神器信息」選項卡,我可以下載的罐子
- ,然後看到的.jar和.jar.sha1文件「 http://127.0.0.1:8081/nexus/content/groups/public/「和」\ nexus \ sonatype-work \ nexus \ storage \ central「
......但由於某些原因,下載.pom
文件
Nexus 2.2附帶一個用於Central預配置的代理存儲庫,我可以瀏覽索引並下載從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.
使用哪個IP地址在哪裏?我有同樣的問題。 –