4

I am trying to build a maven project to test out some testing software - Arquillian.

I setup nexus and added the jboss repositories to the bottom of the public group.

When i run mvn test i get this error:

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

I checked the java.net maven 2 repository and it is definately there.

However when i navigate to my local nexus public group, it is not there.

How can i solve this problem? And what is the cause of this problem? I am in way over my head with this, as I am more accustomed to using ant+ivy.

The full output from mvn is here.

4

5 回答 5

3

我显然有完全相同的问题。我解决了。就我而言,问题在于托管 istack-common-runtime-1.1.0-SNAPSHOT 的存储库在配置的 nexus 代理存储库中被标记为“发布”。因此,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>

希望这有帮助

于 2010-11-04T18:44:06.323 回答
1

如果您使用 nexus Web 界面搜索它,它会显示吗?我在我们的 nexus 安装中看到了这样的情况,其中一个工件看起来像这样丢失了,但出现在搜索结果中。如果然后我通过浏览器从搜索结果中下载它,它就会神奇地开始在 maven 命令行上运行。

我敢肯定,这不是您想听到的强大解决方案,但至少值得一试。

于 2010-09-14T00:50:52.737 回答
1

如果您已将 JBoss 存储库添加到 Nexus,您是否记得配置您的 Public Repositories 组以包含它?

这是一个屏幕截图:

替代文字

于 2010-09-14T00:57:09.300 回答
0

最终成为一个糟糕的依赖。我必须手动添加它才能让它全部工作。糟糕的!

于 2010-10-11T23:22:58.530 回答
0

你在公司防火墙后面吗?可能需要在 Nexus 中配置 HTTP 代理(请参阅服务器管理屏幕)

于 2010-09-15T20:12:31.837 回答