mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Lazily compute Java 8 home in reindex configuration (#42630)
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.
This commit is contained in:
parent
77fc7b2107
commit
6362ac14ad
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user