2015-11-24 103 views
0

創建項目中描述:如何配置maven pom存儲庫?

TEIID/Archetype+Template+Connector+Project

上MVN全新安裝,我得到:

[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平臺:JBoss的整合,與平臺BOM: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>  

但din't幫助,雖然這兩個

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/存在!

最近有什麼不對嗎?

+1

你試過MVN -U全新安裝。爲了強制更新。或者您可以刪除.m2目錄,然後再次嘗試相同的命令。 – Aurelien

回答

2

存儲庫未正確設置。看看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> 
+0

看來,即使默認是必不可少的。其實我以前試過類似的東西,但是沒有,它沒有用。有趣的是,maven沒有抱怨任何配置,但它使用它,但抱怨說找不到pom。 Thx尋求幫助。 – bastiat