Skip to content

Commit

Permalink
Lazily compute Java 8 home in reindex configuration (#42630)
Browse files Browse the repository at this point in the history
In the reindex from old tests we require Java 8. Today when configuring
the reindex from old tests, we eagerly evalulate Java 8 home, which
means that we require JAVA8_HOME to be set even if the reindex from old
test tasks are not in the task graph. This is an onerous requirement if,
for example, all that you want to do is build a distribution. This
commit addresses this by making evaluation of Java 8 home lazy, so that
it is only done and required if the reindex from old test tasks would be
executed.
  • Loading branch information
jasontedor committed May 28, 2019
1 parent 77fc7b2 commit 6362ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/reindex/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
dependsOn unzip
executable = new File(project.runtimeJavaHome, 'bin/java')
env 'CLASSPATH', "${ -> project.configurations.oldesFixture.asPath }"
env 'JAVA_HOME', getJavaHome(it, 8)
env 'JAVA_HOME', "${ -> getJavaHome(it, 8)}"
args 'oldes.OldElasticsearch',
baseDir,
unzip.temporaryDir,
Expand Down

0 comments on commit 6362ac1

Please sign in to comment.