We've a nexus-server which has the common maven-public repository-group containing every external proxy-repository (e.g. maven-central). Besides that we have a local hosted repository. Let's call it MyProjectRepository. It's splitted in a release-repo and a snapshot-repo.
So, currently it looks like this:
- MyProjectRepository
- MyProjectRepository-Snapshots
- ArtifactOne
- Snapshot-5
- ...
- Snapshot-1
- ArtifactTwo
- Snapshot-3
- ...
- Snapshot-1
- ArtifactOne
Okay, ArtifactTwo needs ArtifactOne as a dependency. So, I've added this in the dependencies section:
<dependency>
<groupId>com.company</groupId>
<artifactId>artifactone</artifactId>
<version>0.0.5</version>
</dependency>
I've configured the repository section like this:
<repository>
<id>myprojectrepositoryss</id>
<name>MyProjectRepository Snapshots</name>
<url>http://mylocalnexus.com/nexus/repository/MyProjectRepository-Snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
My settings.xml mirrors-section looks like this:
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>external:*, !myprojectrepositoryss</mirrorOf>
<url>http://mylocalnexus.com/nexus/repository/maven-public/</url>
</mirror>
My settings.xml profiles-section look like this:
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
Despite having setup everything like described in the tutorial, my IDE states that the artifact in the given dependency cannot be found.
Failed to execute goal on project ArtifactTwo: Could not resolve dependencies for project com.company:ArtifactTwo:jar:0.0.3-SNAPSHOT: Failure to find com.company:artifactone:jar:0.0.5 in http://mylocalnexus.com/nexus/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced
Why does it search for the dependency in "maven-public"? Does anybody have a clue how to get this to work?