What am I doing incorrectly to handle this problem with JBoss's Nexus repositories?
I am trying to build JBoss AS7 and proxying the JBoss Public repository group via an internal Nexus repo. I want the entire build proxied via my Nexus repo - no hitting of jboss.org Nexus repos. However, I have encountered a problem.
Everything build OK until it is time to test jboss-as-jmx as it wants to download an artifact from an additional repo ... the /developer group.
I noticed in the log it attempts this:
Downloading artifact org.jboss.as:jboss-as-jmx:jar:7.1.2.Final from jboss-developer (http://repository.jboss.org/nexus/content/groups/developer/, releases+snapshots)
So I added jboss-developer repo id to my Nexus pointing to http://repository.jboss.org/nexus/content/groups/developer and have added it to my proxied JBoss Public group. However, it did not seem to override the jboss-developer repo and Maven still tries to download the artifact from jboss.org
Here is the log output of the test stage in question:
T E S T S
-
Forking command line: /bin/sh -c cd "/opt/jenkins/jobs/JBoss AS7/workspace/jmx" && /usr/java/jdk1.7.0_05/jre/bin/java -Duser.region=US -Duser.language=en -jar '/opt/jenkins/jobs/JBoss AS7/workspace/jmx/target/surefire/surefirebooter6443418663635953999.jar' '/opt/jenkins/jobs/JBoss AS7/workspace/jmx/target/surefire/surefire6887873281987795093tmp' '/opt/jenkins/jobs/JBoss AS7/workspace/jmx/target/surefire/surefire5481790486559149986tmp'
Running org.jboss.as.jmx.model.LegacyTypeConverterUnitTestCase
Tests run: 49, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.389 sec
Running org.jboss.as.jmx.model.ExpressionTypeConverterUnitTestCase
Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.143 sec
Running org.jboss.as.jmx.model.NameConverterUnitTestCase
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.jboss.as.jmx.model.ObjectNameAddressUtilTestCase
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
Running org.jboss.as.jmx.JMXSubsystemTestCase
Resolving artifact org.jboss.as:jboss-as-jmx:jar:7.1.2.Final
Downloading artifact org.jboss.as:jboss-as-jmx:jar:7.1.2.Final from jboss-developer (http://repository.jboss.org/nexus/content/groups/developer/, releases+snapshots)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Downloading: http://repository.jboss.org/nexus/content/groups/developer/org/jboss/as/jboss-as-jmx/7.1.2.Final/jboss-as-jmx-7.1.2.Final.jar
org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.jboss.as:jboss-as-jmx:jar:7.1.2.Final from/to jboss-developer (http://repository.jboss.org/nexus/content/groups/developer/): Error transferring file: Connection timed out from http://repository.jboss.org/nexus/content/groups/developer/org/jboss/as/jboss-as-jmx/7.1.2.Final/jboss-as-jmx-7.1.2.Final.jar
Here is my local ~/.m2/settings.xml - all other dependency artifacts have been proxied by this until this stage. It still doesn't override Maven's attempt to download from http://repository.jboss.org for this one dependency, jboss-as-jmx.
<settings>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://repository.mycompany.com:8080/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></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>jboss-public-repository-group</id>
<url>http://jbosspublic</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>jboss-developer</id>
<url>http://jbosspublicdev</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>
<pluginRepository>
<id>jboss-public-repository-group</id>
<url>http://jbosspublic</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>jboss-developer</id>
<url>http://jbosspublic</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</proxies>
</settings>
Update 1:
When I run mvn help:effective-pom I see this fragment
<distributionManagement>
<repository>
<id>jboss-releases-repository</id>
<name>JBoss Releases Repository</name>
<url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshots Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
and this one:
<jboss.releases.repo.url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</jboss.releases.repo.url>
<jboss.snapshots.repo.url>https://repository.jboss.org/nexus/content/repositories/snapshots/</jboss.snapshots.repo.url>
Which is odd because I know that all the other artifacts are downloading OK from my internal nexus proxy repo. What I'll try next is adding those s to my /.m2/settings.xml
pom.xml
too? – Augusto