Return to Snippet

Revision: 55601
at February 14, 2012 02:35 by laurenceosx


Initial Code
@echo off

@rem Laurence Toenjes 2012-02-13
@rem Batch file to run gant in standalone mode on Windows
@rem because latest gant v1.9.7 batch files do not work.
@rem This assume that folders:
@rem   gant-1.9.7
@rem   apache-ant-1.8.2-bin
@rem are in the same dir as this batch file
@rem and JAVA_HOME has been set correctly.

@setlocal

@SET ANT_HOME=%~dp0apache-ant-1.8.2
@SET GANT_HOME=%~dp0gant-1.9.7
@SET GROOVY_HOME=%GANT_HOME%

@set tmp_file=%temp%\%RANDOM%_%RANDOM%.txt
@dir %GANT_HOME%\lib\groovy-all-* /s/b >%tmp_file%
@SET /P GROOVY_ALL_JAR=<%tmp_file%
@del /q %tmp_file%

"%JAVA_HOME%\bin\java.exe" ^
-Xmx128m ^
-Dprogram.name="%~n0" ^
-Dgroovy.home="%GROOVY_HOME%" ^
-Dant.home="%ANT_HOME%" ^
-Dgant.home="%GANT_HOME%" ^
-Dgroovy.starter.conf="%GANT_HOME%\conf\gant-starter.conf" ^
-Dscript.name="%~n0" ^
-classpath "%GROOVY_ALL_JAR%;" ^
org.codehaus.groovy.tools.GroovyStarter ^
--main gant.Gant ^
--conf "%GANT_HOME%\conf\gant-starter.conf" ^
--classpath "." %*

Initial URL


Initial Description
Dummy comment to make this snippet visible.

Initial Title
Gant batch file for Windows

Initial Tags


Initial Language
DOS Batch