我是一個使用eclipse作爲程序員的企業,我有一個在家中完美的項目。但是,當我嘗試在工作中編譯pom.xml時,它說:「未能傳輸org.apache.maven」和「連接超時」。 我認爲這是因爲企業中的網絡防火牆對端口的使用非常嚴格,可能會阻塞端口。有誰知道maven使用哪些端口和協議來配置自己並進行安裝?這些端口可以手動更改嗎?Maven使用的端口和協議下載Eclipse中的依賴關係?
非常感謝!
我是一個使用eclipse作爲程序員的企業,我有一個在家中完美的項目。但是,當我嘗試在工作中編譯pom.xml時,它說:「未能傳輸org.apache.maven」和「連接超時」。 我認爲這是因爲企業中的網絡防火牆對端口的使用非常嚴格,可能會阻塞端口。有誰知道maven使用哪些端口和協議來配置自己並進行安裝?這些端口可以手動更改嗎?Maven使用的端口和協議下載Eclipse中的依賴關係?
非常感謝!
修改URL端口,你可以做這樣的事情的settings.xml中:
<repositories>
<repository>
<id>repoId</id>
<url>http://url:port/remains</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
並啓用代理,你還可以添加類似的settings.xml中的以下內容:
<proxy>
<id>MyId</id>
<active>true</active>
<protocol>https</protocol>
<username>login</username>
<password>passwordpassword>
<host>proxy-hostname</host>
<port>port</port>
<nonProxyHosts>local.net|localhost</nonProxyHosts>
</proxy>
根據需要適應。
..\apache-maven-*.*.*\conf\settings.xml
鏡子增添
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
添加另一個鏡像沒有任何意義,它可能被相同的防火牆規則阻止。 –
務必閱讀文檔。 maven沒有特定的協議。只需配置代理設置:https://maven.apache.org/guides/mini/guide-proxies.html –