diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index f7d3ea4c6ce..05333e47740 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -687,8 +687,7 @@ class ClusterFormationTasks { static Task configureExecTask(String name, Project project, Task setup, NodeInfo node, Object[] execArgs) { return project.tasks.create(name: name, type: LoggedExec, dependsOn: setup) { Exec exec -> exec.workingDir node.cwd - // TODO: this must change to 7.0.0 after bundling java has been backported - if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("8.0.0")) || + if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("7.0.0")) || node.config.distribution == 'integ-test-zip') { exec.environment.put('JAVA_HOME', project.runtimeJavaHome) } else { @@ -714,7 +713,7 @@ class ClusterFormationTasks { ant.exec(executable: node.executable, spawn: node.config.daemonize, newenvironment: true, dir: node.cwd, taskname: 'elasticsearch') { node.env.each { key, value -> env(key: key, value: value) } - if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("8.0.0")) || + if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("7.0.0")) || node.config.distribution == 'integ-test-zip') { env(key: 'JAVA_HOME', value: project.runtimeJavaHome) }