Maven 无法下载 JBoss 依赖项

发布于 2024-12-08 09:35:49 字数 3623 浏览 0 评论 0原文

以下是代理后面的 Maven 设置

用户设置:

<?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 都会发生这种情况。我还需要什么设置。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

十年九夏 2024-12-15 09:35:49

也许您使用的代理需要 NTLM 身份验证,而 maven 不支持。
您可以尝试使用 CNTLM:
http://cntlm.sourceforge.net/

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

你是我的挚爱i 2024-12-15 09:35:49

JBoss 存储库已于 2011 年 6 月移动,导致许多其他用户遇到像您所描述的问题。您很可能需要更改 pom.xml 中的 URL。

有关更多详细信息,请参阅

PS。进行更改时,请确保检查所有包含 存储库块 的 pom,否则,损坏的 JBoss URL 可能会漏掉这些并终止您的构建

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文