You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2006/01/12 22:43:37 UTC
svn commit: r368480 - in /webservices/axis2/trunk/java/modules/tool/script:
WSDL2Code.bat WSDL2Java.bat http-server.bat start.bat tcp-server.bat
Author: dims
Date: Thu Jan 12 13:43:34 2006
New Revision: 368480
URL: http://svn.apache.org/viewcvs?rev=368480&view=rev
Log:
major overhaul to the bat files with help from tomcat scripts
Modified:
webservices/axis2/trunk/java/modules/tool/script/WSDL2Code.bat
webservices/axis2/trunk/java/modules/tool/script/WSDL2Java.bat
webservices/axis2/trunk/java/modules/tool/script/http-server.bat
webservices/axis2/trunk/java/modules/tool/script/start.bat
webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat
Modified: webservices/axis2/trunk/java/modules/tool/script/WSDL2Code.bat
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/script/WSDL2Code.bat?rev=368480&r1=368479&r2=368480&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/script/WSDL2Code.bat (original)
+++ webservices/axis2/trunk/java/modules/tool/script/WSDL2Code.bat Thu Jan 12 13:43:34 2006
@@ -1,27 +1,47 @@
@echo off
rem ---------------------------------------------------------------------------
-rem Start script for the WSDLCode
+rem Startup script for the WSDLCode
rem
-rem
+rem Environment Variable Prequisites
+rem
+rem AXIS2_HOME Must point at your AXIS2 directory
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem
+rem JAVA_OPTS (Optional) Java runtime options
rem ---------------------------------------------------------------------------
-
-rem store the current directory
set CURRENT_DIR=%cd%
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto okJavaHome
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK/JRE
+goto end
+:okJavaHome
+
rem check the AXIS2_HOME environment variable
if not "%AXIS2_HOME%" == "" goto gotHome
+set AXIS2_HOME=%CURRENT_DIR%
+if exist "%AXIS2_HOME%\bin\start.bat" goto okHome
-rem guess the home. Jump two directories up nad take that as the home
-cd ..
+rem guess the home. Jump one directory up to check if that is the home
cd ..
set AXIS2_HOME=%cd%
+cd %CURRENT_DIR%
:gotHome
if EXIST "%AXIS2_HOME%\lib\axis2*.jar" goto okHome
-echo The AXIS2_HOME environment variable seems not to point to the correct location!
+echo The AXIS2_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
-pause
-exit
+goto end
:okHome
rem set the classes
@@ -30,6 +50,11 @@
set AXIS2_CLASS_PATH=%AXIS2_HOME%
FOR %%c in (%AXIS2_HOME%\lib\*.jar) DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c
-java -cp %AXIS2_CLASS_PATH% org.apache.axis2.wsdl.WSDL2Code %1 %2 %3 %4 %5 %6 %7 %8 %9
+rem ----- Execute The Requested Command ---------------------------------------
+echo Using AXIS2_HOME: %AXIS2_HOME%
+echo Using JAVA_HOME: %JAVA_HOME%
+set _RUNJAVA="%JAVA_HOME%\bin\java.exe"
+
+%_RUNJAVA% %JAVA_OPTS% -cp %AXIS2_CLASS_PATH% org.apache.axis2.wsdl.WSDL2Code %1 %2 %3 %4 %5 %6 %7 %8 %9
endlocal
:end
Modified: webservices/axis2/trunk/java/modules/tool/script/WSDL2Java.bat
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/script/WSDL2Java.bat?rev=368480&r1=368479&r2=368480&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/script/WSDL2Java.bat (original)
+++ webservices/axis2/trunk/java/modules/tool/script/WSDL2Java.bat Thu Jan 12 13:43:34 2006
@@ -1,27 +1,47 @@
@echo off
rem ---------------------------------------------------------------------------
-rem Start script for the WSDLJava
+rem Startup script for the WSDLJava
rem
-rem
+rem Environment Variable Prequisites
+rem
+rem AXIS2_HOME Must point at your AXIS2 directory
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem
+rem JAVA_OPTS (Optional) Java runtime options
rem ---------------------------------------------------------------------------
-
-rem store the current directory
set CURRENT_DIR=%cd%
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto okJavaHome
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK/JRE
+goto end
+:okJavaHome
+
rem check the AXIS2_HOME environment variable
if not "%AXIS2_HOME%" == "" goto gotHome
+set AXIS2_HOME=%CURRENT_DIR%
+if exist "%AXIS2_HOME%\bin\start.bat" goto okHome
-rem guess the home. Jump two directories up nad take that as the home
-cd ..
+rem guess the home. Jump one directory up to check if that is the home
cd ..
set AXIS2_HOME=%cd%
+cd %CURRENT_DIR%
:gotHome
if EXIST "%AXIS2_HOME%\lib\axis2*.jar" goto okHome
-echo The AXIS2_HOME environment variable seems not to point to the correct location!
+echo The AXIS2_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
-pause
-exit
+goto end
:okHome
rem set the classes
@@ -30,7 +50,11 @@
set AXIS2_CLASS_PATH=%AXIS2_HOME%
FOR %%c in (%AXIS2_HOME%\lib\*.jar) DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c
-rem run the command
-java -cp %AXIS2_CLASS_PATH% org.apache.axis2.wsdl.WSDL2Java %1 %2 %3 %4 %5 %6 %7 %8 %9
+rem ----- Execute The Requested Command ---------------------------------------
+echo Using AXIS2_HOME: %AXIS2_HOME%
+echo Using JAVA_HOME: %JAVA_HOME%
+set _RUNJAVA="%JAVA_HOME%\bin\java"
+
+%_RUNJAVA% %JAVA_OPTS% -cp %AXIS2_CLASS_PATH% org.apache.axis2.wsdl.WSDL2Java %1 %2 %3 %4 %5 %6 %7 %8 %9
endlocal
:end
Modified: webservices/axis2/trunk/java/modules/tool/script/http-server.bat
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/script/http-server.bat?rev=368480&r1=368479&r2=368480&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/script/http-server.bat (original)
+++ webservices/axis2/trunk/java/modules/tool/script/http-server.bat Thu Jan 12 13:43:34 2006
@@ -1,15 +1,61 @@
@echo off
rem ---------------------------------------------------------------------------
-rem Start script for running the Simple Axis Server
+rem Startup script for the Simple HTTP Server
rem
+rem Environment Variable Prequisites
+rem
+rem AXIS2_HOME Must point at your AXIS2 directory
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem
+rem JAVA_OPTS (Optional) Java runtime options
rem ---------------------------------------------------------------------------
+set CURRENT_DIR=%cd%
+
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto okJavaHome
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK/JRE
+goto end
+:okJavaHome
+
+rem check the AXIS2_HOME environment variable
+if not "%AXIS2_HOME%" == "" goto gotHome
+set AXIS2_HOME=%CURRENT_DIR%
+if exist "%AXIS2_HOME%\bin\start.bat" goto okHome
-rem get the classes for the simple axis server
-rem set the AXIS2_HOME as the default classpath
+rem guess the home. Jump one directory up to check if that is the home
+cd ..
+set AXIS2_HOME=%cd%
+cd %CURRENT_DIR%
+
+:gotHome
+if EXIST "%AXIS2_HOME%\lib\axis2*.jar" goto okHome
+echo The AXIS2_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+
+:okHome
+rem set the classes
setlocal EnableDelayedExpansion
rem loop through the libs and add them to the class path
set AXIS2_CLASS_PATH=%AXIS2_HOME%
FOR %%c in (%AXIS2_HOME%\lib\*.jar) DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c
-java -cp %AXIS2_CLASS_PATH% org.apache.axis2.transport.http.SimpleHTTPServer %1 %2
-endlocal
\ No newline at end of file
+rem ----- Execute The Requested Command ---------------------------------------
+echo Using AXIS2_HOME: %AXIS2_HOME%
+echo Using JAVA_HOME: %JAVA_HOME%
+set _RUNJAVA="%JAVA_HOME%\bin\java"
+
+%_RUNJAVA% %JAVA_OPTS% -cp %AXIS2_CLASS_PATH% org.apache.axis2.transport.http.SimpleHTTPServer %1 %2 %3 %4 %5 %6 %7 %8 %9
+endlocal
+:end
+
Modified: webservices/axis2/trunk/java/modules/tool/script/start.bat
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/script/start.bat?rev=368480&r1=368479&r2=368480&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/script/start.bat (original)
+++ webservices/axis2/trunk/java/modules/tool/script/start.bat Thu Jan 12 13:43:34 2006
@@ -1,18 +1,44 @@
@echo off
rem ---------------------------------------------------------------------------
-rem Start script for the Simple Axis Server
+rem Startup script for the Simple Axis Server (with default parameters)
rem
-rem This starts the server with default parameters
+rem Environment Variable Prequisites
+rem
+rem AXIS2_HOME Must point at your AXIS2 directory
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem
+rem JAVA_OPTS (Optional) Java runtime options
rem ---------------------------------------------------------------------------
+set CURRENT_DIR=%cd%
-rem Guess AXIS2_HOME if not defined
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto okJavaHome
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK/JRE
+goto end
+:okJavaHome
+
+rem check the AXIS2_HOME environment variable
if not "%AXIS2_HOME%" == "" goto gotHome
+set AXIS2_HOME=%CURRENT_DIR%
+if exist "%AXIS2_HOME%\bin\start.bat" goto okHome
+
+rem guess the home. Jump one directory up to check if that is the home
cd ..
set AXIS2_HOME=%cd%
+cd %CURRENT_DIR%
:gotHome
-
-if exist "%AXIS2_HOME%\bin\http-server.bat" goto okHome
+if EXIST "%AXIS2_HOME%\bin\http-server.bat" goto okHome
echo The AXIS2_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
@@ -30,6 +56,5 @@
:okService
set EXECUTABLE="%AXIS2_HOME%\bin\http-server.bat"
-call %EXECUTABLE% %REPO_FOLDER% 8080
-
+call %EXECUTABLE% %REPO_FOLDER%
:end
Modified: webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat?rev=368480&r1=368479&r2=368480&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat (original)
+++ webservices/axis2/trunk/java/modules/tool/script/tcp-server.bat Thu Jan 12 13:43:34 2006
@@ -1,36 +1,60 @@
@echo off
rem ---------------------------------------------------------------------------
-rem Start script for running the Simple Axis Server
+rem Startup script for the TCP Server
rem
+rem Environment Variable Prequisites
+rem
+rem AXIS2_HOME Must point at your AXIS2 directory
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem
+rem JAVA_OPTS (Optional) Java runtime options
rem ---------------------------------------------------------------------------
+set CURRENT_DIR=%cd%
-rem get the classes for the simple axis server
-setlocal EnableDelayedExpansion
-rem loop through the libs and add them to the class path
-set AXIS2_CLASS_PATH=%AXIS2_HOME%
-FOR %%c in (%AXIS2_HOME%\lib\*.jar) DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto okJavaHome
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK/JRE
+goto end
+:okJavaHome
rem check the AXIS2_HOME environment variable
if not "%AXIS2_HOME%" == "" goto gotHome
+set AXIS2_HOME=%CURRENT_DIR%
+if exist "%AXIS2_HOME%\bin\start.bat" goto okHome
-rem guess the home. Jump two directories up nad take that as the home
-cd ..
+rem guess the home. Jump one directory up to check if that is the home
cd ..
set AXIS2_HOME=%cd%
+cd %CURRENT_DIR%
:gotHome
if EXIST "%AXIS2_HOME%\lib\axis2*.jar" goto okHome
-echo The AXIS2_HOME environment variable seems not to point to the correct location!
+echo The AXIS2_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
-pause
-exit
+goto end
:okHome
rem set the classes
-cd %CURRENT_DIR%
setlocal EnableDelayedExpansion
rem loop through the libs and add them to the class path
set AXIS2_CLASS_PATH=%AXIS2_HOME%
FOR %%c in (%AXIS2_HOME%\lib\*.jar) DO set AXIS2_CLASS_PATH=!AXIS2_CLASS_PATH!;%%c
-java -cp %AXIS2_CLASS_PATH% org.apache.axis2.transport.tcp.TCPServer %1 %2
+
+rem ----- Execute The Requested Command ---------------------------------------
+echo Using AXIS2_HOME: %AXIS2_HOME%
+echo Using JAVA_HOME: %JAVA_HOME%
+set _RUNJAVA="%JAVA_HOME%\bin\java"
+
+%_RUNJAVA% %JAVA_OPTS% -cp %AXIS2_CLASS_PATH% org.apache.axis2.transport.tcp.TCPServer %1 %2 %3 %4 %5 %6 %7 %8 %9
endlocal
+:end