如何配置maven pom存储库?

How to configure maven pom repositories?

我按照以下描述创建项目:

TEIID/Archetype+Template+Connector+Project

在 mvn clean install 上我得到:

[ERROR] Failed to execute goal on project connector-myType: 
Could not resolve dependencies for project org.jboss.teiid.connectors:connector-myType:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.jboss.teiid:teiid-api:jar:8.7.0.Final: 
Failed to read artifact descriptor for org.jboss.teiid:teiid-api:jar:8.7.0.Final: 
Failure to find org.jboss.integration-platform:jboss-integration-platform-bom:pom:6.0.0-SNAPSHOT
in http://snapshots.jboss.org/maven2 was cached in the local repository, 
resolution will not be reattempted until the update interval of jboss has elapsed or updates are forced -> [Help 1]

找不到org.jboss.integration-platform:jboss-integration-platform-b​​om:pom:6.0.0-SNAPSHOT 在 http://snapshots.jboss.org/maven2 中缓存在本地存储库中,

我添加到我的 pom.xml:

<repositories>

<repository>
    <id>jboss</id>
    <name>jboss</name>
    <url>http://snapshots.jboss.org/maven2</url>
    I also tried with https://repository.jboss.org/nexus/content/repositories/snapshots/
</repository>
</repositories>    

但这并没有帮助,虽然两者都

http://snapshots.jboss.org/maven2/org/jboss/integration-platform/jboss-integration-platform-bom/6.0.0-SNAPSHOT/

http://snapshots.jboss.org/maven2/org/jboss/integration-platform/jboss-integration-platform-bom/6.0.0-SNAPSHOT/ 存在!

有什么问题吗?

存储库设置不正确。看看 Maven Getting Started Guide.

基本上应该是:

<repositories>
    <repository>
        <id>jboss</id>
        <name>jboss</name>
        <url>http://repository.jboss.org/nexus/content/groups/public/</url>
        <layout>default</layout>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>