Maven Failing download the JBoss dependency

喜你入骨 提交于 2019-12-11 06:17:32

问题


Below are my maven settings from behind the proxy

User 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>
<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>

Global 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>

However I get 'Connection timed out' when I try to execute test goal. This happens with both maven command line and M2Eclipse. What more settings do I require.


回答1:


Maybe the proxy you are using requires NTLM authentication, which maven does not support. You can try to use CNTLM: http://cntlm.sourceforge.net/




回答2:


JBoss repository has been moved in June 2011 causing many other users to experience problems like you describe. Most likely you need to change the URL in your pom.

For more details, refer to

  • How to configure jboss repository properly for my repository manager
    and other answers listed as "Related" to above
  • JBoss wiki for maven users: Maven Getting Started - Users

PS. When doing the change, make sure to check all your poms that contain repository blocks because otherwise, broken JBoss URL may slip through these and kill your build



来源:https://stackoverflow.com/questions/7657978/maven-failing-download-the-jboss-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!