Set https.protocols when running with JDK 7

This commit is contained in:
rfscholte 2018-07-01 01:07:16 +02:00
parent 3d3c068a13
commit 5514aa7dc4
1 changed files with 8 additions and 2 deletions

10
Jenkinsfile vendored
View File

@ -91,10 +91,16 @@ for (String os in runITsOses) {
withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[ withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
junitPublisher(ignoreAttachments: false) junitPublisher(ignoreAttachments: false)
]) { ]) {
def cmd = "${runITscommand} -DmavenDistro=$WORK_DIR/apache-maven-dist.zip -Dmaven.test.failure.ignore=true"
if (jdk == '7') {
// Java 7u80 has TLS 1.2 disabled by default: need to explicitely enable
cmd += ' -Dhttps.protocols=TLSv1.2'
}
if (isUnix()) { if (isUnix()) {
sh "${runITscommand} -DmavenDistro=$WORK_DIR/apache-maven-dist.zip -Dmaven.test.failure.ignore=true" sh "${cmd}"
} else { } else {
bat "${runITscommand} -DmavenDistro=$WORK_DIR/apache-maven-dist.zip -Dmaven.test.failure.ignore=true" bat "${cmd}"
} }
} }
deleteDir() // clean up after ourselves to reduce disk space deleteDir() // clean up after ourselves to reduce disk space