Point d'entrée de l'application antRunner

Le plug-in de base Ant déclare un point d'entrée principal qui permet l'exécution du support Ant intégré d'Eclipse dans un environnement en mode "headless". Une compilation Ant peut ensuite être exécutée directement à partir du programme de lancement principal de la plateforme.

Voici un exemple de fichier .bat qui explique comment utiliser le point d'entrée de l'application antRunner sous Windows :

 
echo off
setlocal

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

REM Le fichier JRED java.exe à utiliser
set JAVAEXE="C:\jdk1.4.2\jre\bin\java.exe"

REM Le fichier startup.jar d'Eclipse
set STARTUPJAR="C:\eclipse\startup.jar"

REM L'emplacement de votre espace de travail
set WORKSPACE=C:\runtime-workspace

REM Le fichier de compilation à utiliser pour la compilation
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

Concepts connexes
Support Ant