这是关于github上javaEE maven项目的很多例子,但当我尝试清理这个:https://github.com/javaee-samples/javaee7-samples时,我在命令行中出错,请问pom.xml中有什么问题:
[ERROR] Failed to execute goal on project cdi-decorators: Could not resolve dependencies for project org.javaee7:cdi-decorators:war:1.0-SNAPSHOT: Could not find artifact org.javaee7:test-utils:jar:1.0-SNAPSHOT in codehaus-snapshots (http://nexus.codehaus.org/snapshots/) -> [Help 1]
这是pom.xml的一部分:
<repositories>
<repository>
<id>codehaus-snapshots</id>
<name>Codehaus Snapshots</name>
<url>http://nexus.codehaus.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>codehaus-snapshots</id>
<name>Codehaus Snapshots</name>
<url>http://nexus.codehaus.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
我缺少什么? 提前谢谢。
答案 0 :(得分:1)
从样本的根目录,即javaee7-samples目录:
mvn -DskipTests=true clean install
来自javaee7-samples / cdi / decorators目录:
mvn test
答案 1 :(得分:1)
你也可以使用 mvn clean install -DskipTests