👷 Try to use toolchain definitions on Jenkins
authorDavid Roden <github-a8in@qsheltier.de>
Mon, 5 May 2025 17:47:22 +0000 (19:47 +0200)
committerDavid Roden <github-a8in@qsheltier.de>
Mon, 5 May 2025 18:04:45 +0000 (20:04 +0200)
Jenkinsfile

index 2701024..f57bcd7 100644 (file)
@@ -11,7 +11,9 @@ pipeline {
                 jdk 'OpenJDK 21'
             }
             steps {
-                sh './mvnw clean compile test-compile'
+                configFileProvider([configFile(fileId: 'fb50fa11-48a8-44b8-84fd-e11f06ab1067', targetLocation: 'toolchains.xml')]) {
+                    sh './mvnw -t toolchains.xml clean compile test-compile'
+                }
             }
         }
         stage('Test') {
@@ -19,7 +21,9 @@ pipeline {
                 jdk 'OpenJDK 21'
             }
             steps {
-                sh './mvnw verify'
+                configFileProvider([configFile(fileId: 'fb50fa11-48a8-44b8-84fd-e11f06ab1067', targetLocation: 'toolchains.xml')]) {
+                    sh './mvnw -t toolchains.xml verify'
+                }
             }
             post {
                 always {
@@ -33,9 +37,11 @@ pipeline {
                 jdk 'OpenJDK 21'
             }
             steps {
-                sh './mvnw -DskipTests=true package'
-                archiveArtifacts artifacts: 'target/*.jar', fingerprint: true
-                javadoc javadocDir: 'target/apidocs', keepAll: true
+                configFileProvider([configFile(fileId: 'fb50fa11-48a8-44b8-84fd-e11f06ab1067', targetLocation: 'toolchains.xml')]) {
+                    sh './mvnw -t toolchains.xml -DskipTests=true package'
+                    archiveArtifacts artifacts: 'target/*.jar', fingerprint: true
+                    javadoc javadocDir: 'target/apidocs', keepAll: true
+                }
             }
         }
     }