【发布时间】:2015-10-27 11:14:35
【问题描述】:
我正在为部署到 jboss wildfly 9.0.1.Final 的 ejb 应用程序编写独立客户端。我查看过的文档表明 wildfly 目录中有一个自述文件 (readme-ejb-jms.txt)。该文件包含以下对 Maven 依赖项的建议:
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-ejb-client-bom</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-jms-client-bom</artifactId>
<type>pom</type>
</dependency>
</dependencies>
如果我使用它,我会收到一个错误,说需要版本,所以我修改了依赖项,如下所示:
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-ejb-client-bom</artifactId>
<version>9.0.1.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-jms-client-bom</artifactId>
<version>9.0.1.Final</version>
<type>pom</type>
</dependency>
当我使用上述方法运行 mvn clean install 时,出现此错误:
The following artifacts could not be resolved:
org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final,
org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final:
Failure to find org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final
mvn clean install 的完整输出如下所示:
C:\_WORKSPACE\workspace\_myapp\myappjbosswildflyclient>mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myappjbosswildflyclient 4.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final is missing, no dependency information available
[WARNING] The POM for org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.957s
[INFO] Finished at: Tue Aug 04 17:17:04 EDT 2015
[INFO] Final Memory: 5M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project myappjbosswildflyclient: Could not resolve dependencies for project mycompany-myapp:myappjbosswildflyclient:jar:4.3.0-SNAPSHOT: The following artifacts could not be resolved: org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final, org.jboss.as:jboss-as-jms-client-bom:pom:9.0.1.Final: Failure to find org.jboss.as:jboss-as-ejb-client-bom:pom:9.0.1.Final in http://downl
oad.java.net/maven/2 was cached in the local repository, resolution will not be reattempted until the update interval of java.net2 has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
C:\_WORKSPACE\workspace\_myapp\myappjbosswildflyclient>
我应该为这些依赖项使用什么?
【问题讨论】:
-
如果我运行 mvn clean install -U 会得到同样的错误
-
我仍然没有运气让它工作。我发现了很多很多版本的依赖项的外观,但是将它们复制并粘贴到我的 pom.xml 文件中都会给出类似的错误。一些不起作用的事情:mvnrepository.com/artifact/org.wildfly/wildfly-client-all/…,尝试了其中几个没有运气:mvnrepository.com/artifact/org.wildfly/wildfly-ejb-client-bom,mvnrepository.com/artifact/org.wildfly/wildfly-ejb-client-bom/…,等等。
标签: java maven jboss ejb wildfly