You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2018/09/20 19:50:39 UTC

[maven-surefire] branch settings created (now 329a8ca)

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a change to branch settings
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.


      at 329a8ca  INFRA-16951 (HTTP 503 from repo.maven.apache.org)

This branch includes the following new commits:

     new 329a8ca  INFRA-16951 (HTTP 503 from repo.maven.apache.org)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-surefire] 01/01: INFRA-16951 (HTTP 503 from repo.maven.apache.org)

Posted by ti...@apache.org.
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 329a8ca28b99d7ae58ad45d5d3b323109bf461ea
Author: Tibor17 <ti...@apache.org>
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..6035efc 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 settingsXml = null
         def mvnLocalRepoDir = null
         if (isUnix()) {
             sh 'mkdir -p .m2'
-            mvnLocalRepoDir = "${pwd()}/.m2"
+            sh 'mkdir -p .m2/repository'
+            mvnLocalRepoDir = "${pwd()}/.m2/repository"
+            settingsXml = "${pwd()}/.m2/settings.xml"
         } else {
             bat 'mkdir .m2'
-            mvnLocalRepoDir = "${pwd()}\\.m2"
+            bat 'mkdir .m2\\repository'
+            mvnLocalRepoDir = "${pwd()}\\.m2\\repository"
+            settingsXml = "${pwd()}\\.m2\\settings.xml"
         }
 
         println "Maven Local Repository = ${mvnLocalRepoDir}."
         assert mvnLocalRepoDir != null : 'Local Maven Repository is undefined.'
+        writeFile(file: settingsXml, text: settingsXmlContent, encoding: 'UTF-8')
+        options += ['-s', settingsXml]
 
         stage("checkout ${stageKey}") {
             checkout scm