blob: aaae0814dc09397d29b54bbd2eb06f1fb1e980aa [file] [log] [blame]
david_williams7d02bc22009-12-16 18:40:28 +00001<?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 A utility ant script to invoke AntRunner application with
4 Eclipse. This is handy since some ant scripts are running in
5 plain ant, but we'd like to use Eclipse's ant tasks for things
6 like p2 operations.
7 -->
8<project
9 name="runAntRunner"
10 default="runAntRunner"
11 basedir=".">
12
13 <fail unless="eclipse.home" message="eclispe.home must be set to run this script" />
14
15 <property name="eclipse.launcher" value="${eclipse.home}/plugins/org.eclipse.equinox.launcher.jar" />
16
17 <available file="${eclipse.launcher}" property="launcherAvailable" />
18 <fail unless="launcherAvailable" message="Eclipse Laucher is not available, as ${eclipse.launcher}. Perhaps eclipse.home is not correct value?" />
19
20
21 <!-- if not set by caller, be sure it is 'build' -->
22 <property
23 name="antrunnertarget"
24 value="build"/>
25 <fail
26 unless="antrunnerfile"
27 message="Must provide ant file to run"/>
28 <target
29 name="runAntRunner">
30
31 <!-- long term we should make this sensitive to if already running in eclipse, and if so,
32 just invoke the script? check if="eclipse.running"? -->
33
34 <java
35 taskname="AntRunner"
36 jar="${eclipse.launcher}"
37 fork="true"
38 failonerror="${failOnError}">
39
40
41 <jvmarg
42 value="-Dosgi.instance.area=${HOME}/temp/workspace-runAntRunner-${antrunnerfile}-${antrunnertarget}" />
43 <arg
44 value="-application"/>
45 <arg
46 value="org.eclipse.ant.core.antRunner"/>
47 <arg
48 value="-buildfile"/>
49 <arg
50 value="${antrunnerfile}"/>
51 <arg
52 value="${antrunnertarget}"/>
53 </java>
54 </target>
55</project>