| <?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" /> |
| |
| <available file="${eclipse.home}" property="eclipseAvailable" /> |
| <fail unless="eclipseAvailable" message="Eclipse is not available, as ${eclipse.home}. Perhaps eclipse.home has incorrect 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" |
| |
| fork="true" |
| failonerror="${failOnError}" |
| |
| classname="org.eclipse.equinox.launcher.Main"> |
| <classpath> |
| <fileset |
| dir="${eclipse.home}/eclipse/plugins"> |
| <include |
| name="org.eclipse.equinox.launcher_*.jar"/> |
| </fileset> |
| </classpath> |
| |
| <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> |