Merge pull request #12001 from rmuir/no_dont_do_that

Don't add CWD to classpath when ES_CLASSPATH isn't set.
This commit is contained in:
Robert Muir 2015-07-02 14:53:24 -04:00
commit 3171f52461
2 changed files with 14 additions and 2 deletions

View File

@ -88,5 +88,11 @@ set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8
REM Use our provided JNA always versus the system one REM Use our provided JNA always versus the system one
set JAVA_OPTS=%JAVA_OPTS% -Djna.nosys=true set JAVA_OPTS=%JAVA_OPTS% -Djna.nosys=true
set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/${project.build.finalName}.jar;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/* set CORE_CLASSPATH=%ES_HOME%/lib/${project.build.finalName}.jar;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/*
if "%ES_CLASSPATH%" == "" (
set ES_CLASSPATH=%CORE_CLASSPATH%
) else (
set ES_CLASSPATH=%ES_CLASSPATH%;%CORE_CLASSPATH%
)
set ES_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES_HOME%" set ES_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES_HOME%"

View File

@ -1,6 +1,12 @@
#!/bin/sh #!/bin/sh
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/lib/${project.build.finalName}.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*" CORE_CLASSPATH="$ES_HOME/lib/${project.build.finalName}.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*"
if [ "x$ES_CLASSPATH" = "x" ]; then
ES_CLASSPATH="$CORE_CLASSPATH"
else
ES_CLASSPATH="$ES_CLASSPATH:$CORE_CLASSPATH"
fi
if [ "x$ES_MIN_MEM" = "x" ]; then if [ "x$ES_MIN_MEM" = "x" ]; then
ES_MIN_MEM=${packaging.elasticsearch.heap.min} ES_MIN_MEM=${packaging.elasticsearch.heap.min}