Maven Nexus private repository access

mavenmaven-2nexusrepository

I have just set up a nexus repository in my local network. This repository exposes access to the Maven central repository, plus three different private hosted repositories: snapshot, release and ext3rdparty. All these repositories are part of the public group in nexus, which I use as a central access point for all repositories:

http://nexus.server/nexus/content/groups/public/

My problem is: Using NetBeans as development envirnment, I can access to all repositories except the ext3rdparty. i.e. i got a compilation error when I try to build projects which are based on libraries stored in the ext3rdparty repo, and NetBeans can't find / navigate any of the artifacts available in this repository.

I suspect this is a settings.xml / pom.xml problem and not a NetBeans one because as I said, I can access to artifacts that I've released in other repositories, but I can't figure-out what's the problem.

Here is the FULL content of my settings.xml to redirect maven to my own repository:

<mirrors>
    <mirror>
        <id>nexus</id>
        <mirrorOf>*</mirrorOf>
        <url>http://nexus.server/nexus/content/groups/public</url>
    </mirror>
</mirrors>

<profiles>
    <profile>
        <id>nexus</id>
        <repositories>
            <repository>
                <id>central</id>
                <url>http://central</url>
                <releases>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>central</id>
                <url>http://central</url>
                <releases>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

<activeProfiles>
    <activeProfile>nexus</activeProfile>
</activeProfiles>

<servers>
    <server>
        <id>nexus</id>
        <username>user</username>
        <password>***</password>
    </server>
    <server>
        <id>releases</id>
        <username>user</username>
        <password>***</password>
    </server>
    <server>
        <id>snapshots</id>
        <username>user</username>
        <password>***</password>
    </server>
</servers>

And here is the repositories-related part of my parent pom to allow deployment:

        <distributionManagement>
            <repository>
                <id>releases</id>
                <name>Releases</name>
                <url>http://nexus.server/nexus/content/repositories/releases/</url>
            </repository>

            <snapshotRepository>
                <id>snapshots</id>
                <name>Snapshots</name>
                <url>http://nexus.server/nexus/content/repositories/snapshots/</url>
            </snapshotRepository>
        </distributionManagement>

Any idea of what's wrong ?

Thanks in advance!

EDIT:

Half of a day lost: I finally ended up with removing all dependencies from the ext3rdparty repository, uploading them again to the repository, and updating all indexes and now everything works fine…

Don't really know what was the problem here, but at least the pom and the settings were OK. Thanks for your help.

Best Answer

If you have that sort of problem you can right click on the affected repository in the Repositories list and activate a Repair Index or Update Index and then check the status in the System Feeds for System updates.