Maven pom无法解决jboss依赖问题

时间:2015-04-09 07:01:07

标签: maven jboss pom.xml

我实际上有一个非常简单的POM,但我仍然得到这个错误

[ERROR] Failed to execute goal on project MyEE: Could not resolve dependencies for project com.roi:MyEE:jar:1.0-SNAPSHOT: Failure to find org.jboss.spec:jboss-javaee-6.0:jar:3.0.3.Final in https://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]

这是我的依赖

<dependencies>
<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>3.8.1</version>
  <scope>test</scope>
</dependency>

  <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
      <version>7.0</version>
      <scope>provided</scope>
  </dependency>

  <dependency>
    <groupId>org.jboss.spec</groupId>
    <artifactId>jboss-javaee-6.0</artifactId>
    <version>3.0.3.Final</version>
  </dependency>

</dependencies>

这有什么用途?这种依赖性取决于其他jar吗?

1 个答案:

答案 0 :(得分:1)

查看其pom.xml文件

https://repo1.maven.org/maven2/org/jboss/spec/jboss-javaee-6.0/3.0.3.Final/jboss-javaee-6.0-3.0.3.Final.pom

包装是pom,所以你需要添加一个类型&#34; pom&#34;在依赖节点

  <dependency>
        <groupId>org.jboss.spec</groupId>
        <artifactId>jboss-javaee-6.0</artifactId>
        <version>3.0.3.Final</version>
        <type>pom</type>
    </dependency>