|
@@ -657,8 +657,8 @@ 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
|
|
|
- if (project.isRuntimeJavaHomeSet || node.nodeVersion.before(Version.fromString("7.0.0")) ||
|
|
|
- node.config.distribution == 'integ-test-zip') {
|
|
|
+ if ((project.isRuntimeJavaHomeSet && node.isBwcNode == false) // runtime Java might not be compatible with old nodes
|
|
|
+ || node.config.distribution == 'integ-test-zip') {
|
|
|
exec.environment.put('JAVA_HOME', project.runtimeJavaHome)
|
|
|
} else {
|
|
|
// force JAVA_HOME to *not* be set
|
|
@@ -683,8 +683,8 @@ 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("7.0.0")) ||
|
|
|
- node.config.distribution == 'integ-test-zip') {
|
|
|
+ if ((project.isRuntimeJavaHomeSet && node.isBwcNode == false) // runtime Java might not be compatible with old nodes
|
|
|
+ || node.config.distribution == 'integ-test-zip') {
|
|
|
env(key: 'JAVA_HOME', value: project.runtimeJavaHome)
|
|
|
}
|
|
|
node.args.each { arg(value: it) }
|