Hi everybody,
I have some trooble with the configuration of settings.xml.
Indeed, in my company I have already installed the nexus 3 OSS and I have already uploaded some libraries.
When I use this configuration I can download perfectly librairies available through my nexus 3 :
<settings>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://myhost:myport/nexus/repository/maven-public/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
<servers>
<server>
<id>nexus</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
</settings>
But in my CI server, I need to use the nexus 3 and the nexus 2.
So I need to configure my settings.xml with the two nexus.
For the time being I didn't find the good configuration of my settings.xml.
Could you help me ?
I tried this configuration :
<settings>
<mirrors>
<mirror>
<id>nexus3</id>
<mirrorOf>*</mirrorOf>
<url>http://myhost:myport/nexus/repository/maven-public/</url>
</mirror>
<mirror>
<id>nexus2</id>
<mirrorOf>*</mirrorOf>
<url>http://myhost:myport/nexus/repository/maven-public/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus2</id>
<repositories>
<repository>
<id>central</id>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>nexus3</id>
<repositories>
<repository>
<id>central</id>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus2</activeProfile>
<activeProfile>nexus3</activeProfile>
</activeProfiles>
<servers>
<server>
<id>nexus3</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
</settings>
Please find below the error met when the maven clean install use the bad repository :
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project******:version-SNAPSHOT (/home/nrosado/Bureau/livraisons/livraison_****/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find **** in http://****/nexus/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus3 has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 10, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles: