1 @if "%DEBUG%" == "" @echo off
5 @rem Gant -- A Groovy way of scripting Ant tasks.
9 @rem Copyright © 2008 Russel Winder
13 @rem Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
15 @rem compliance with the License. You may obtain a copy of the License at
19 @rem http://www.apache.org/licenses/LICENSE-2.0
23 @rem Unless required by applicable law or agreed to in writing, software distributed under the License is
25 @rem distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
27 @rem implied. See the License for the specific language governing permissions and limitations under the
33 @rem Author : Russel Winder <russel.winder@concertant.com>
37 @rem Gant initiation script for Windows.
41 @rem Set local scope for the variables with windows NT shell
43 if "%OS%" == "Windows_NT" setlocal
49 if "%DIRNAME%" == "" set DIRNAME=.\
53 @rem If GANT_HOME is not set, deduce a path.
57 if not "%GANT_HOME%" == "" goto endSetGantHome
59 set GANT_HOME=%DIRNAME%..
65 @rem Force GROOVY_HOME to be GANT_HOME so that the startGroovy code does the right thing.
69 set GROOVY_HOME=%GANT_HOME%
73 @rem If ANT_HOME is not set, deduce a path -- this is needed in order to discover the location of the jars
75 @rem asscoiated with the Ant installation.
79 if not "%ANT_HOME%" == "" goto endSetAntHome
81 for %%P in ( %PATH% ) do if exist %%P\ant.bat set ANT_HOME=%%P\..
83 if not "%ANT_HOME%" == "" goto endSetAntHome
85 call :environmentVariableError ANT_HOME
95 set GROOVY_SCRIPT_NAME=gant.bat
97 set STARTER_CONF=%GANT_HOME%\conf\gant-starter.conf
99 set JAVA_OPTS=%JAVA_OPTS% -Dgant.home="%GANT_HOME%" -Dant.home="%ANT_HOME%" -Xmx512m -XX:MaxPermSize=150m
103 %GANT_HOME%\bin\startGroovy.bat %DIRNAME% gant.Gant %*
107 @rem End local scope for the variables with windows NT shell
109 if "%OS%" == "Windows_NT" endlocal
117 :environmentVariableError
121 echo ERROR: Environment variable %1 has not been set.
123 echo Attempting to find %1 from PATH also failed.