本文介绍了无法执行项目目标.在项目中找不到POM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试构建具有以下依赖性的应用程序.
I am trying to build an application having following dependency.
<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/
This is an example which i found on Red Hat Site - http://www.jboss.org/quickstarts/eap/helloworld-jms/
我正在使用Netbeans 8.0.2.(也在dos和eclipse中使用Maven命令尝试过)在构建时出现错误,以下是相同的日志:
I am using Netbeans 8.0.2.(also tried it using Maven command in dos and eclipse) I am getting an error while building and following is log of same:
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]
我可以在以下路径上找到文件:
I can locate file on following path:
推荐答案
您需要在pom.xml
或setting.xml
中添加 redhat repo . 安装和使用Maven存储库
You need to add redhat repo in your pom.xml
or setting.xml
. 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>
这篇关于无法执行项目目标.在项目中找不到POM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!