geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [76/90] [abbrv] incubator-geode git commit: GEODE-1331: gfsh.bat on Windows is incorrect.
Date Wed, 08 Jun 2016 00:05:53 GMT
GEODE-1331: gfsh.bat on Windows is incorrect.

* Renamed internal variable from CLASSPATH to DEPENDENCIES.
* Verified @setlocal was not altering the System environment variables for the shell.
* Launch with -classpath param like the bash script does.
* Ensured command-line arguments match bash script's order of arguments.
* This closes #149


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8e21638c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8e21638c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8e21638c

Branch: refs/heads/feature/GEODE-835
Commit: 8e21638ce336aee07bec33d140500c76d1cedc53
Parents: 41d9cff
Author: Kevin J. Duling <kduling@pivotal.io>
Authored: Thu May 26 09:46:03 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Mon Jun 6 09:05:07 2016 -0700

----------------------------------------------------------------------
 geode-assembly/src/main/dist/bin/gfsh.bat | 33 +++++++++++++-------------
 1 file changed, 16 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8e21638c/geode-assembly/src/main/dist/bin/gfsh.bat
----------------------------------------------------------------------
diff --git a/geode-assembly/src/main/dist/bin/gfsh.bat b/geode-assembly/src/main/dist/bin/gfsh.bat
index 6813243..706146a 100755
--- a/geode-assembly/src/main/dist/bin/gfsh.bat
+++ b/geode-assembly/src/main/dist/bin/gfsh.bat
@@ -37,25 +37,22 @@ REM echo %scriptdir%
 :gfok
 @set GEMFIRE=%gf%
 
-@set GEMFIRE_JARS=%GEMFIRE%\lib\gfsh-dependencies.jar
+@set GFSH_JARS=%GEMFIRE%\lib\gfsh-dependencies.jar
+REM if a system level classpath is set, append it to the classes gfsh will need
 @if defined CLASSPATH (
-@set GEMFIRE_JARS=%GEMFIRE_JARS%;%CLASSPATH%
+    @set DEPENDENCIES=%GFSH_JARS%;%CLASSPATH%
+) else (
+    @set DEPENDENCIES=%GFSH_JARS%
 )
 
 @if not defined GF_JAVA (
-@REM %GF_JAVA% is not defined, assume it is on the PATH
-@if defined JAVA_HOME (
-@set GF_JAVA=%JAVA_HOME%\bin\java.exe
+REM %GF_JAVA% is not defined, assume it is on the PATH
+    @if defined JAVA_HOME (
+    @set GF_JAVA=%JAVA_HOME%\bin\java.exe
 ) else (
-@set GF_JAVA=java
+    @set GF_JAVA=java
+  )
 )
-) 
-
-REM
-REM GFSH_JARS
-REM
-@set GFSH_JARS=;%GEMFIRE%\lib\gfsh-dependencies.jar
-@set CLASSPATH=%GFSH_JARS%;%GEMFIRE_JARS%
 
 REM
 REM Copy default .gfshrc to the home directory. Uncomment if needed.
@@ -71,17 +68,19 @@ REM @if not exist "%USERPROFILE%\.gemfire" (
 REM @mkdir "%USERPROFILE%\.gemfire"
 REM )
 
-REM  Consider java is from JDK
+REM  Expect to find the tools.jar from the JDK
 @set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar
 @IF EXIST "%TOOLS_JAR%" (
-    @set CLASSPATH=%CLASSPATH%;%TOOLS_JAR%
+    @set DEPENDENCIES=%DEPENDENCIES%;%TOOLS_JAR%
 ) ELSE (
     set TOOLS_JAR=
 )
 
 @set LAUNCHER=com.gemstone.gemfire.management.internal.cli.Launcher
 @if defined JAVA_ARGS (
-@set JAVA_ARGS="%JAVA_ARGS%"
+    @set JAVA_ARGS="%JAVA_ARGS%"
 )
-@"%GF_JAVA%" -Dgfsh=true -Dlog4j.configurationFile=classpath:log4j2-cli.xml %JAVA_ARGS% %LAUNCHER%
%*
+
+REM Call java with our classpath
+@"%GF_JAVA%" -Dgfsh=true -Dlog4j.configurationFile=classpath:log4j2-cli.xml -classpath %DEPENDENCIES%
%JAVA_ARGS% %LAUNCHER% %*
 :done


Mime
View raw message