blob: aaae0814dc09397d29b54bbd2eb06f1fb1e980aa [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
A utility ant script to invoke AntRunner application with
Eclipse. This is handy since some ant scripts are running in
plain ant, but we'd like to use Eclipse's ant tasks for things
like p2 operations.
-->
<project
name="runAntRunner"
default="runAntRunner"
basedir=".">
<fail unless="eclipse.home" message="eclispe.home must be set to run this script" />
<property name="eclipse.launcher" value="${eclipse.home}/plugins/org.eclipse.equinox.launcher.jar" />
<available file="${eclipse.launcher}" property="launcherAvailable" />
<fail unless="launcherAvailable" message="Eclipse Laucher is not available, as ${eclipse.launcher}. Perhaps eclipse.home is not correct value?" />
<!-- if not set by caller, be sure it is 'build' -->
<property
name="antrunnertarget"
value="build"/>
<fail
unless="antrunnerfile"
message="Must provide ant file to run"/>
<target
name="runAntRunner">
<!-- long term we should make this sensitive to if already running in eclipse, and if so,
just invoke the script? check if="eclipse.running"? -->
<java
taskname="AntRunner"
jar="${eclipse.launcher}"
fork="true"
failonerror="${failOnError}">
<jvmarg
value="-Dosgi.instance.area=${HOME}/temp/workspace-runAntRunner-${antrunnerfile}-${antrunnertarget}" />
<arg
value="-application"/>
<arg
value="org.eclipse.ant.core.antRunner"/>
<arg
value="-buildfile"/>
<arg
value="${antrunnerfile}"/>
<arg
value="${antrunnertarget}"/>
</java>
</target>
</project>