我正在尝试构建一个具有以下依赖关系的应用程序。
<properties>
<version.jboss.as>7.5.0.Final-redhat-21</version.jboss.as>
</properties>
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-jms-client-bom</artifactId>
<version>${version.jboss.as}</version>
<type>pom</type>
</dependency>
</dependencies>
这是我在Red Hat网站上找到的一个例子 - http://www.jboss.org/quickstarts/eap/helloworld-jms/
我正在使用Netbeans 8.0.2。(也在dos和eclipse中使用Maven命令尝试了它)我在构建和跟踪时遇到错误是相同的日志:
Building JBoss EAP Quickstart: helloworld-jms 6.4.0.GA
------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/jboss/as/jboss-as-jms-client-bom/7.5.0.Final-redhat-21/jboss-as-jms-client-bom-7.5.0.Final-redhat-21.pom
The POM for org.jboss.as:jboss-as-jms-client-bom:pom:7.5.0.Final-redhat-21 is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 7.268s
Finished at: Thu Jun 18 13:27:43 IST 2015
Final Memory: 6M/121M
------------------------------------------------------------------------
Failed to execute goal on project jboss-helloworld-jms: Could not resolve dependencies for project org.jboss.quickstarts.eap:jboss-helloworld-jms:jar:6.4.0.GA: Failure to find org.jboss.as:jboss-as-jms-client-bom:pom:7.5.0.Final-redhat-21 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
我可以在以下路径中找到文件:
答案 0 :(得分:3)
您需要在pom.xml
或setting.xml
中添加 redhat repo 。 Install and Use the Maven Repository
如:
<repositories>
<repository>
<id>jboss-enterprise-techpreview-group</id>
<name>JBoss Enterprise Technology Preview Maven Repository Group</name>
<url>http://maven.repository.redhat.com/techpreview/all/</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/</url>
<layout>default</layout>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>