blob: dcea8871fa4da93542d71b90ef0ea8f7c0c92f48 [file] [log] [blame]
david_williams7d02bc22009-12-16 18:40:28 +00001<?xml version="1.0" encoding="UTF-8"?>
david_williamsc9321c32009-12-16 19:27:03 +00002<!--
david_williams7d02bc22009-12-16 18:40:28 +00003 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 -->
david_williamsc9321c32009-12-16 19:27:03 +00008<project name="runAntRunner" default="runAntRunner" basedir=".">
david_williams7d02bc22009-12-16 18:40:28 +00009
10 <fail unless="eclipse.home" message="eclispe.home must be set to run this script" />
david_williamsc9321c32009-12-16 19:27:03 +000011
david_williams7e749ce2009-12-16 18:50:40 +000012 <available file="${eclipse.home}" property="eclipseAvailable" />
13 <fail unless="eclipseAvailable" message="Eclipse is not available, as ${eclipse.home}. Perhaps eclipse.home has incorrect value?" />
david_williams7d02bc22009-12-16 18:40:28 +000014
david_williams7d02bc22009-12-16 18:40:28 +000015
david_williamsc9321c32009-12-16 19:27:03 +000016 <!-- if not set by caller, be sure it is 'build' -->
17 <property name="antrunnertarget" value="build" />
18 <fail unless="antrunnerfile" message="Must provide ant file to run" />
19 <target name="runAntRunner">
20
21 <!-- long term we should make this sensitive to if already running in eclipse, and if so,
22 just invoke the script? check if="eclipse.running"? -->
23
24 <java taskname="AntRunner" fork="true" failonerror="${failOnError}" classname="org.eclipse.equinox.launcher.Main">
25 <classpath>
26 <fileset dir="${eclipse.home}/plugins">
27 <include name="org.eclipse.equinox.launcher_*.jar" />
28 </fileset>
29 </classpath>
30
31 <jvmarg value="-Dosgi.instance.area=${HOME}/temp/workspace-runAntRunner-${antrunnerfile}-${antrunnertarget}" />
32
33 <jvmarg value="-DrepoSource=${repoSource}" />
34 <jvmarg value="-DrepoDestination=${repoDestination}" />
35
36 <arg value="-application" />
37 <arg value="org.eclipse.ant.core.antRunner" />
38 <arg value="-buildfile" />
39 <arg value="${antrunnerfile}" />
40 <arg value="${antrunnertarget}" />
41 </java>
42 </target>
david_williams7d02bc22009-12-16 18:40:28 +000043</project>