为什么我的pom.xml中出现此依赖项解析错误?

时间:2012-12-21 18:04:55

标签: java-ee maven pom.xml atmosphere

当我尝试构建我的网络应用程序时出现以下错误 -

  

无法在项目MyApp上执行目标:无法解决   项目com.myapp的依赖项:MyApp:war:1.0-SNAPSHOT:可以   找不到神器   org.atmosphere.samples:atmosphere-jaxrs2-chat:jar:1.0.5 in primefaces   (http://repository.primefaces.org/) - > [帮助1]

这是我的pom.xml的存储库和依赖项部分

<repositories>
    <repository>
        <url>http://repository.primefaces.org/</url>
        <id>primefaces</id>
        <layout>default</layout>
        <name>Repository for library PrimeFaces 3.2</name>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>3.5-SNAPSHOT</version>
    </dependency>  
    <dependency>
        <groupId>org.atmosphere</groupId>
        <artifactId>atmosphere-runtime</artifactId>
        <version>1.0.6</version>
    </dependency>              
    <dependency>
        <groupId>org.atmosphere.samples</groupId>
        <artifactId>atmosphere-jaxrs2-chat</artifactId>
        <version>1.0.5</version>
    </dependency>
</dependencies>

我不明白为什么要在primefaces存储库中查找工件org.atmosphere.samples:atmosphere-jaxrs2-chat:jar:1.0.5?为什么不把它从中央maven存储库中拉出来?我以为默认情况下会自动使用该存储库吗?

大气运行时神器似乎没问题,所以我不明白为什么其他气氛神器造成了这个问题?

1 个答案:

答案 0 :(得分:2)

该工件的版本不在maven存储库中,至少没有该组和工件ID ... maven central repo中的最后一个版本是1.0.1,你可以看到here