-1
嗨, 我使用archiva創建了新的maven工件,以便與我的團隊共享更新的jar項目。當我嘗試部署我得到了這個項目失敗:Maven部署失敗?
downloading: http://**VirtualMachineName:8888/groupId**/webInfra/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata **groupId**:webInfra:0.0.1-SNAPSHOT/maven-metadata.xml from/to stmaven (http://**VirtualMachineName:8888**): Failed to transfer http://**VirtualMachineName:8888/groupId**/webInfra/0.0.1-SNAPSHOT/maven-metadata.xml. Error code 504, Proxy Timeout (The connection timed out. )
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:05 min
[INFO] Finished at: 2016-03-08T10:04:00+02:00
[INFO] Final Memory: 14M/249M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project webInfra: Failed to retrieve remote metadata il.co.stms-automation:webInfra:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata **groupId**:webInfra:0.0.1-SNAPSHOT/maven-metadata.xml from/to stmaven (http://VirtualMachineName:8888): Failed to transfer http://**VirtualMachineName:8888/groupId**/webInfra/0.0.1-SNAPSHOT/maven-metadata.xml. Error code 504, Proxy Timeout (The connection timed out. ) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
this what I added to pom.xml file:
<repository>
<id>stmaven</id>
<name>stmaven</name>
<url>http://stmaven:8888</url>
</repository>
what added to setting.xml file:
<servers>
<server>
<id>VirtualMachineName</id>
<username>user</username>
<password>pass</password>
</server>
<!---->
</servers>
<mirrors>
<mirror>
<id>mirrorId</id>
<mirrorOf>archiva</mirrorOf>
<name>maven archiva Mycompany</name>
<url>http://VirtualMachineName:8888/#browse/**groupId**</url>
</mirror>
</mirrors>
注:我很新創建和維護Maven倉庫。
謝謝
Herer的問題。 '錯誤代碼504,代理超時'.. – khmarbaise
在settings.xml文件中聲明的代理,我應該在另一個地方聲明它嗎? –
沒關係,你已經宣佈了...重點是它有超時的... – khmarbaise