C:\eclipse\plugins\org.apache.ant_1.7.1.v20090120-1145\bin\ant.bat
简化的ant.bat
ant.bat
---------
@echo off
set DIRNAME=%~d0%~p0 //当前目录
set BUILD_XML=%DIRNAME%build.xml //指定build文件名
set PARAMS=%* //获得参数
rem set JAVA_HOME="C:\Progra~1\Java\jdk1.6.0_29" //不需要设置,使用本地机器的
set JAVA=%JAVA_HOME%\bin\java //java
set JAVA_TOOL_OPTIONS=
set _JAVA_OPTIONS=
set ANTCLASSPATH=%JAVA_HOME%\lib\tools.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-launcher.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-nodeps.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-jsch.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-contrib-1.0b3.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\jsch-0.1.45.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnant.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnClientAdapter.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnjavahl.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnkit.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\ganymed.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\JeraAntTasks.jar
set ANT_HOME=%DIRNAME%ant
"%JAVA%" -cp "%ANTCLASSPATH%" -Dant.home="%ANT_HOME%" org.apache.tools.ant.launch.Launcher -buildfile "%BUILD_XML%" %PARAMS% //java执行ant Lanuncher
----------------
简化的ant.bat
ant.bat
---------
@echo off
set DIRNAME=%~d0%~p0 //当前目录
set BUILD_XML=%DIRNAME%build.xml //指定build文件名
set PARAMS=%* //获得参数
rem set JAVA_HOME="C:\Progra~1\Java\jdk1.6.0_29" //不需要设置,使用本地机器的
set JAVA=%JAVA_HOME%\bin\java //java
set JAVA_TOOL_OPTIONS=
set _JAVA_OPTIONS=
set ANTCLASSPATH=%JAVA_HOME%\lib\tools.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-launcher.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-nodeps.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-jsch.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant-contrib-1.0b3.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\ant.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\jsch-0.1.45.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnant.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnClientAdapter.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnjavahl.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\svnkit.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\ganymed.jar
set ANTCLASSPATH=%ANTCLASSPATH%;%DIRNAME%ant\lib\JeraAntTasks.jar
set ANT_HOME=%DIRNAME%ant
"%JAVA%" -cp "%ANTCLASSPATH%" -Dant.home="%ANT_HOME%" org.apache.tools.ant.launch.Launcher -buildfile "%BUILD_XML%" %PARAMS% //java执行ant Lanuncher
----------------