2011-10-05 116 views
1

下面是我Maven的設置從代理背後Maven的失敗下載JBoss的依賴

用戶設置:

<?xml version="1.0" encoding="UTF-8"?> 
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> 
<localRepository>D:\path\mvn_repo</localRepository> 
<pluginGroups></pluginGroups> 
<proxies> 
<proxy> 
     <active>true</active> 
     <protocol>https</protocol> 
     <username>myusername</username> 
     <password>password</password> 
     <host>myproxyhost</host> 
     <port>myproxyport</port> 
    </proxy> 

    <proxy> 
     <active>true</active> 
     <protocol>http</protocol> 
     <username>myusername</username> 
     <password>password</password> 
     <host>myproxyhost</host> 
     <port>myproxyport</port> 
    </proxy> 
</proxies> 
<servers></servers> 
<mirrors></mirrors> 
<profiles></profiles> 
</settings> 

全局設置:

<?xml version="1.0" encoding="UTF-8"?> 
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> 
<localRepository>D:\path\mvn_repo</localRepository> 
<pluginGroups></pluginGroups> 
<proxies></proxies> 
<servers></servers> 
<mirrors></mirrors> 
<profiles> 
    <profile> 
     <id>jboss-public-repository</id> 
     <repositories> 
      <repository> 
       <id>jboss-public-repository-group</id> 
       <name>JBoss Public Maven Repository Group</name> 
       <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> 
       <layout>default</layout> 
       <releases> 
        <enabled>true</enabled> 
        <updatePolicy>never</updatePolicy> 
       </releases> 
       <snapshots> 
        <enabled>true</enabled> 
        <updatePolicy>never</updatePolicy> 
       </snapshots> 
      </repository> 
     </repositories> 
     <pluginRepositories> 
      <pluginRepository> 
       <id>jboss-public-repository-group</id> 
       <name>JBoss Public Maven Repository Group</name> 
       <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url> 
       <layout>default</layout> 
       <releases> 
        <enabled>true</enabled> 
        <updatePolicy>never</updatePolicy> 
       </releases> 
       <snapshots> 
        <enabled>true</enabled> 
        <updatePolicy>never</updatePolicy> 
       </snapshots> 
      </pluginRepository> 
     </pluginRepositories> 
    </profile> 
</profiles> 
<activeProfiles> 
</settings> 

但是我得到 '連接超時'當我嘗試執行測試目標時。 maven命令行和M2Eclipse都會發生這種情況。我還需要什麼更多的設置。

回答

4

也許您正在使用的代理服務器需要NTLM身份驗證,這是maven不支持的。 您可以嘗試使用CNTLM: http://cntlm.sourceforge.net/

+0

像魅力一樣工作....謝謝! –

1

JBoss存儲庫已在2011年6月移動,導致許多其他用戶遇到像您所描述的問題。很可能你需要更改你的pom中的URL。

有關詳細信息,請參閱

PS。在做更改時,請務必檢查所有包含repository blocks的poms,否則,破損的JBoss URL可能會漏過這些內容並殺死您的版本