blob: 3f6ad4d70b1c8ce740c7bdbdadf91fdcd4193987 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2009, 2019 IBM Corporation and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
IBM Corporation - initial API and implementation
-->
<!--
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}/plugins">
<include name="org.eclipse.equinox.launcher_*.jar" />
</fileset>
</classpath>
<jvmarg value="-Dosgi.instance.area=${HOME}/temp/workspace-runAntRunner-${antrunnerfile}-${antrunnertarget}" />
<jvmarg value="-DrepoSource=${repoSource}" />
<jvmarg value="-DrepoDestination=${repoDestination}" />
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="${antrunnerfile}" />
<arg value="${antrunnertarget}" />
</java>
</target>
</project>