我正在试图在jboss7.1.1上建立一个MDB,我有一个maven项目,但javax.jms包无法导入,我已经在pom.xml中填充了以下依赖项
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.1</version>
</dependency>
我还在pom.xml中定义了这个repo
<repository>
<id>jboss-public-repository</id>
<name>JBoss Repository</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<!-- These optional flags are designed to speed up your builds
by reducing remote server calls -->
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
在eclipse中我得到了反复意见
ArtifactDescriptorException: Failed to read artifact descriptor for javax.jms:jms:jar:1.1:
ArtifactResolutionException: Failure to transfer javax.jms:jms:pom:1.1 from
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.
Original error: Could not transfer artifact javax.jms:jms:pom:1.1 from/to central (http://repo.maven.apache.org/maven2):
Remotely Closed [id: 0x01c17b4c, /0:0:0:0:0:0:0:1:54960 :> repo.maven.apache.org/185.31.16.185:80] pom.xml /fourPMOperations-ejb line 1 Maven Dependency Problem
任何提示?它必须是一些配置问题。
答案 0 :(得分:0)
我找到了解决方案,我已经将这种依赖性包含在pom中了:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>