我正在尝试构建一个 Maven 项目来测试一些测试软件 - Arquillian。
我设置了 nexus 并将 jboss 存储库添加到公共组的底部。
当我跑步时mvn test
我收到这个错误:
Missing:
----------
1) com.sun.istack:istack-commons-runtime:jar:1.1-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.sun.istack -DartifactId=istack-commons-runtime -Dversion=1.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.sun.istack -DartifactId=istack-commons-runtime -Dversion=1.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.jboss.arquillian.sandbox.showcase:arquillian-sandbox-showcase-jsf:jar:1.0.0-SNAPSHOT
2) org.jboss.jbossas:jboss-as-client:pom:6.0.0.20100721-M4
3) org.jboss.jbossas:jboss-as-iiop:jar:client:6.0.0.20100721-M4
4) org.jboss.jbossts:jbossjts:jar:4.11.0.Final
5) org.jboss.ws.native:jbossws-native-core:jar:3.3.0.CR1.SP2
6) com.sun.xml.ws:jaxws-rt:jar:2.2
7) com.sun.xml.ws:policy:jar:2.0-b01
8) com.sun.istack:istack-commons-runtime:jar:1.1-SNAPSHOT
我检查了 java.net maven 2 存储库,它绝对是there http://download.java.net/maven/2/com/sun/istack/istack-commons/.
但是,当我导航到本地 Nexus 公共群组时,它不在那里。
我怎么解决这个问题?而造成这个问题的原因是什么?我对此感到不知所措,因为我更习惯使用 ant+ivy。
mvn 的完整输出是here http://pastie.org/1157120.
我显然也遇到了完全相同的问题。我解决了。
就我而言,问题是托管 istack-common-runtime-1.1.0-SNAPSHOT 的存储库在配置的 nexus 代理存储库中被标记为“release”。因此,nexus 忽略了该存储库中的所有快照。
我刚刚配置了另一个代理存储库,指向包含 istack-common-runtime-1.1.0-SNAPSHOT 的同一代理存储库,但在配置它时将其标记为“SNAPSHOT”。然后我将这个新代理添加到我的“SNAPSHOT”组中。
在我的 settings.xml 中,我在公共关系组上有一个存储库,在快照组上有另一个存储库:
<profiles>
<profile>
<id>nexus</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>release</id>
<url>http://nexus-server/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>http://nexus-server/nexus/content/groups/public-snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
希望这有帮助
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)