jenkins - Maven downloads from central though other repo configured and artifact already present -
i run jenkins build on server without internet access. artifacts must downloaded nexus proxy repositories. goes fine, tens of jars being downloaded proxy, until maven tries download central artifact has downloaded. below lines of log:
[info] downloading: http://{mynexus}/nexus/content/groups/{myrepo}/commons-lang/commons-lang/2.6/commons-lang-2.6.jar . . . [info] downloaded: http://{mynexus}/nexus/content/groups/{myrepo}/commons-lang/commons-lang/2.6/commons-lang-2.6.jar (278 kb @ 3118.6 kb/sec) . . . [info] downloaded: http://{mynexus}/nexus/content/groups/{myrepo}/com/google/guava/guava/10.0.1/guava-10.0.1.jar (1467 kb @ 23275.9 kb/sec) [info] downloading: http://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar picked java_tool_options: -agentlib:jvmhook [warning] failed getclass org.codehaus.mojo.sonar.sonarmojo
it doesn't try check configured repository first, , artifact has been downloaded proxy. wonder last 2 lines mean, not normal 'could not transfer artifact' failure message. further down log:
waiting jenkins finish collecting data[error] failed execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project xxx: execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar failed: plugin org.codehaus.mojo:sonar-maven-plugin:2.5 or 1 of dependencies not resolved: not transfer artifact commons-lang:commons-lang:jar:2.6 from/to central (http://repo.maven.apache.org/maven2): connect repo.maven.apache.org:80 [repo.maven.apache.org/23.235.43.215] failed: connection timed out: connect -> [help 1]
such behaviour caused if have like
<mirrorof>repositoryid</mirrorof>
in settings.xml.
to force maven use mirror and mirror, must write
<mirrorof>*</mirrorof>
in settings.xml
Comments
Post a Comment