You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2018/06/29 14:22:39 UTC

[maven-jenkins-lib] branch master updated: Ensure at least minimum required Java version is used

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

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jenkins-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new d21c533  Ensure at least minimum required Java version is used
d21c533 is described below

commit d21c533ad45f7e7876144bd1d2ebdb5f13a14493
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri Jun 29 16:22:32 2018 +0200

    Ensure at least minimum required Java version is used
---
 vars/asfMavenTlpPlgnBuild.groovy | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vars/asfMavenTlpPlgnBuild.groovy b/vars/asfMavenTlpPlgnBuild.groovy
index 8d9ccac..f16ceb9 100644
--- a/vars/asfMavenTlpPlgnBuild.groovy
+++ b/vars/asfMavenTlpPlgnBuild.groovy
@@ -34,13 +34,14 @@ def call(Map params = [:]) {
     // now determine the matrix of parallel builds
     def oses = params.containsKey('os') ? params.os : ['linux', 'windows']
     def jdks = params.containsKey('jdks') ? params.jdks : params.containsKey('jdk') ? params.jdk : ['7','8','9','10']
+    def jdkMin = jdks[0];
     def mavens = params.containsKey('maven') ? params.maven : ['3.0.x','3.1.x','3.2.x','3.3.x','3.5.x']
     def failFast = params.containsKey('failFast') ? params.failFast : true
     Map tasks = [failFast: failFast]
     boolean first = true
     for (String os in oses) {
       for (def mvn in mavens) {
-	    def jdk = jenkinsEnv.jdkForMaven(mvn)
+	    def jdk = Math.max( jdkMin as Integer, jenkinsEnv.jdkForMaven( mvn ) as Integer) as String
 		jdks = jdks.findAll{ it != jdk }
 	    doCreateTask( os, jdk, mvn, tasks, first )
       }