Merge pull request #42723 from thefloweringash/es5-plugin-classpath

elasticsearch5: Set classpath for elasticsearch-plugin
This commit is contained in:
Matthew Bauer 2018-07-05 22:10:47 -04:00 committed by GitHub
commit 62f47c56b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -27,7 +27,9 @@ stdenv.mkDerivation rec {
--set JAVA_HOME "${jre_headless}" \
--set ES_JVM_OPTIONS "$out/config/jvm.options"
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
wrapProgram $out/bin/elasticsearch-plugin \
--prefix ES_CLASSPATH : "$out/lib/*" \
--set JAVA_HOME "${jre_headless}"
'';
meta = {

View File

@ -32,3 +32,12 @@ diff -rupN a/bin/elasticsearch.in.sh b/bin/elasticsearch.in.sh
-fi
-
-ES_CLASSPATH="$ES_HOME/lib/*"
diff -rupN a/bin/elasticsearch-plugin b/bin/elasticsearch-plugin
--- a/bin/elasticsearch-plugin 2018-04-13 01:21:55.000000000 +0900
+++ b/bin/elasticsearch-plugin 2018-06-28 19:08:54.700969245 +0900
@@ -88,4 +88,4 @@ if [ -e "$CONF_DIR" ]; then
path_props=("${path_props[@]}" -Des.path.conf="$CONF_DIR")
fi
-exec "$JAVA" $ES_JAVA_OPTS -Delasticsearch "${path_props[@]}" -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginCli "${args[@]}"
+exec "$JAVA" $ES_JAVA_OPTS -Delasticsearch "${path_props[@]}" -cp "$ES_CLASSPATH" org.elasticsearch.plugins.PluginCli "${args[@]}"