Posted By

laurenceosx on 02/14/12


Tagged

gant


Versions (?)

Gant batch file for Windows


 / Published in: DOS Batch
 

Dummy comment to make this snippet visible.

  1. @echo off
  2.  
  3. @rem Laurence Toenjes 2012-02-13
  4. @rem Batch file to run gant in standalone mode on Windows
  5. @rem because latest gant v1.9.7 batch files do not work.
  6. @rem This assume that folders:
  7. @rem gant-1.9.7
  8. @rem apache-ant-1.8.2-bin
  9. @rem are in the same dir as this batch file
  10. @rem and JAVA_HOME has been set correctly.
  11.  
  12.  
  13. @SET ANT_HOME=%~dp0apache-ant-1.8.2
  14. @SET GANT_HOME=%~dp0gant-1.9.7
  15. @SET GROOVY_HOME=%GANT_HOME%
  16.  
  17. @set tmp_file=%temp%\%RANDOM%_%RANDOM%.txt
  18. @dir %GANT_HOME%\lib\groovy-all-* /s/b >%tmp_file%
  19. @SET /P GROOVY_ALL_JAR=<%tmp_file%
  20. @del /q %tmp_file%
  21.  
  22. "%JAVA_HOME%\bin\java.exe" ^
  23. -Xmx128m ^
  24. -Dprogram.name="%~n0" ^
  25. -Dgroovy.home="%GROOVY_HOME%" ^
  26. -Dant.home="%ANT_HOME%" ^
  27. -Dgant.home="%GANT_HOME%" ^
  28. -Dgroovy.starter.conf="%GANT_HOME%\conf\gant-starter.conf" ^
  29. -Dscript.name="%~n0" ^
  30. -classpath "%GROOVY_ALL_JAR%;" ^
  31. org.codehaus.groovy.tools.GroovyStarter ^
  32. --main gant.Gant ^
  33. --conf "%GANT_HOME%\conf\gant-starter.conf" ^
  34. --classpath "." %*

Report this snippet  

You need to login to post a comment.