antRunner 응용프로그램 시작점

Ant 코어 플러그인은 헤드레스 환경에서 Eclipse의 통합 Ant 지원을 실행할 수 있도록 하는 기본 시작점을 선언합니다. 그러면 Ant 빌드를 기본 플랫폼 실행기에서 직접 실행할 수 있습니다.

다음은 Windows에서 antRunner 응용프로그램 시작점을 이용하는 방법을 보여주는 예제 .bat 파일입니다.

 
echo off
setlocal

REM ****************************************************

REM The JRE java.exe to be used
set JAVAEXE="C:\jdk1.4.2\jre\bin\java.exe"

REM The Eclipse startup.jar
set STARTUPJAR="C:\eclipse\startup.jar"

REM The location of your workspace
set WORKSPACE=C:\runtime-workspace

REM The buildfile to use for the build
set BUILDFILE=build.xml

REM ****************************************************

if not exist %JAVAEXE% echo ERROR: incorrect java.exe=%JAVAEXE%, edit this file and correct the JAVAEXE envar
if not exist %JAVAEXE% goto done

if not exist %STARTUPJAR% echo ERROR: incorrect startup.jar=%STARTUPJAR%, edit this file and correct the STARTUPJAR envar
if not exist %STARTUPJAR% goto done

if not exist %WORKSPACE% echo ERROR: incorrect workspace=%WORKSPACE%, edit this file and correct the WORKSPACE envar
if not exist %WORKSPACE% goto done

if not exist %BUILDFILE% echo ERROR: incorrect buildfile=%BUILDFILE%, edit this file and correct the BUILDFILE envar
if not exist %BUILDFILE% goto done

:run
@echo on
%JAVAEXE% -cp %STARTUPJAR% org.eclipse.core.launcher.Main -noupdate -application
org.eclipse.ant.core.antRunner -data %WORKSPACE% -buildfile %BUILDFILE%

:done
pause

관련 개념
Ant 지원