Missing maven dependency using nexus setup

跟風遠走 提交于 2019-12-05 20:54:40

I had apparently the exact same problem. I solved it. In my case, the problem was that the repository that was hosting istack-common-runtime-1.1.0-SNAPSHOT was flagged "release" in the configured nexus proxy repo. So nexus was ignoring all snapshots in that repository. I just configured another proxy repository pointing on the same one that contains istack-common-runtime-1.1.0-SNAPSHOT, but flagging it to "SNAPSHOT" when configuring it. I then added this new proxy to my "SNAPSHOT" group.

In my settings.xml, I have a repository on the public nexus group and another on the snapshots group :

<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>

Hope this help

Does it show up if you use the nexus web interface to search for it? I've seen cases in our nexus install where an artifact looks like it's missing like this, but shows up in the search results. If I then download it via my browser from the search results, it magically starts working at the maven command line.

Not the robust solution you want to hear, I'm sure, but it's at least worth a try.

If you've added the JBoss repository to Nexus, did you remember to configure your Public Repositories group to include it?

Here's a screenshot:

Are you behind a corporate firewall? Perhaps a HTTP proxy needs to be configured within Nexus (See the Server admin screen)

Ended up being a bad dependency. I had to add it manually to get it all working. Terrible!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!