You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2020/07/26 19:35:06 UTC
[logging-pipelines] branch master updated: Specify JAVA_HOME in
runMaven
This is an automated email from the ASF dual-hosted git repository.
mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-pipelines.git
The following commit(s) were added to refs/heads/master by this push:
new ee2add4 Specify JAVA_HOME in runMaven
ee2add4 is described below
commit ee2add43d8239739dcc588363e010918b39e7250
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Sun Jul 26 14:34:52 2020 -0500
Specify JAVA_HOME in runMaven
---
log4j/Jenkinsfile | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/log4j/Jenkinsfile b/log4j/Jenkinsfile
index 49037d7..967c37a 100644
--- a/log4j/Jenkinsfile
+++ b/log4j/Jenkinsfile
@@ -43,10 +43,6 @@ pipeline {
// https://cwiki.apache.org/confluence/display/INFRA/Jenkins+node+labels
label 'ubuntu'
}
- tools {
- // https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix
- jdk 'JDK 1.8 (latest)'
- }
environment {
LANG = 'C.UTF-8'
}
@@ -89,10 +85,6 @@ pipeline {
// https://cwiki.apache.org/confluence/display/INFRA/Jenkins+node+labels
label 'Windows'
}
- tools {
- // https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix
- jdk 'JDK 1.8 (latest)'
- }
steps {
// note that previous test runs of log4j-mongodb* may have left behind an embedded mongo folder
// also note that we don't need to use the jenkins system property here as it's ubuntu-specific
@@ -140,13 +132,17 @@ pipeline {
def runMaven(String args) {
if (isUnix()) {
configFileProvider([configFile(fileId: 'ubuntu', variable: 'TOOLCHAINS')]) {
- // note that the jenkins system property is set here to activate certain pom properties in
- // some log4j modules that compile against system jars (e.g., log4j-jmx-gui)
- sh "./mvnw --toolchains \"\$TOOLCHAINS\" -Djenkins ${args}"
+ withEnv(['JAVA_HOME=/home/jenkins/tools/java/latest1.8']) {
+ // note that the jenkins system property is set here to activate certain pom properties in
+ // some log4j modules that compile against system jars (e.g., log4j-jmx-gui)
+ sh "./mvnw --toolchains \"\$TOOLCHAINS\" -Djenkins ${args}"
+ }
}
} else {
configFileProvider([configFile(fileId: 'windows', variable: 'TOOLCHAINS')]) {
- bat ".\\mvnw.cmd --toolchains \"%TOOLCHAINS%\" ${args}"
+ withEnv(['JAVA_HOME=f:\\jenkins\\tools\\java\\latest1.8']) {
+ bat ".\\mvnw.cmd --toolchains \"%TOOLCHAINS%\" ${args}"
+ }
}
}
}