This is an automated email from the ASF dual-hosted git repository. tibordigana pushed a commit to branch settings in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 66a7c9a4e05818326761c680492f7a36d726e344 Author: Tibor17 <[email protected]> AuthorDate: Thu Sep 20 21:50:25 2018 +0200 INFRA-16951 (HTTP 503 from repo.maven.apache.org) --- Jenkinsfile | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9de3f2f..b2c2c52 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -122,17 +122,36 @@ timeout(time: 12, unit: 'HOURS') { def buildProcess(String stageKey, String jdkName, String jdkTestName, String mvnName, goals, options, mavenOpts, boolean makeReports) { cleanWs() try { + def settingsXmlContent = ''' + <settings> + <mirrors> + <mirror> + <id>nexus</id> + <mirrorOf>*</mirrorOf> + <name>Sonatype Nexus</name> + <url>https://repository.apache.org/content/groups/public</url> + </mirror> + </mirrors> + </settings>''' + def mvnLocalRepoDir = null if (isUnix()) { sh 'mkdir -p .m2' - mvnLocalRepoDir = "${pwd()}/.m2" + sh 'mkdir -p .m2/repository' + mvnLocalRepoDir = "${pwd()}/.m2/repository" + sh 'touch .m2/settings.xml' + writeFile(file: '.m2/settings.xml', text: settingsXmlContent, encoding: 'UTF-8') } else { bat 'mkdir .m2' - mvnLocalRepoDir = "${pwd()}\\.m2" + bat 'mkdir .m2\\repository' + mvnLocalRepoDir = "${pwd()}\\.m2\\repository" + bat 'copy nul .m2\\settings.xml' + writeFile(file: '.m2\\settings.xml', text: settingsXmlContent, encoding: 'UTF-8') } println "Maven Local Repository = ${mvnLocalRepoDir}." assert mvnLocalRepoDir != null : 'Local Maven Repository is undefined.' + options += ['-s', '.m2/settings.xml'] stage("checkout ${stageKey}") { checkout scm
