| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| A utility ant script to invoke Eclipse application. |
| --> |
| <project |
| name="runAppRunner" |
| default="runAppRunner" |
| basedir="."> |
| |
| <!-- = = = standard properties pattern = = = --> |
| <!-- |
| Note to be cross-platform, "environment variables" are only |
| appropriate for some variables, e.g. ones we set, since |
| properties are case sensitive, even if the environment variables |
| on your operating system are not, e.g. it will be ${env.Path} |
| not ${env.PATH} on Windows |
| --> |
| <property environment="env"/> |
| <!-- |
| Let users override standard properties, if desired. If |
| directory, file, or some properties do not exist, then standard |
| properties will be used. |
| --> |
| <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/> |
| |
| <!-- = = = end standard properties pattern = = = --> |
| <fail |
| unless="env.BUILD_HOME" |
| message="all scripts need a BUILD_HOME"/> |
| <echo |
| level="info" |
| message="buildDirectory: ${buildDirectory}"/> |
| <property |
| name="keyCfgFile" |
| value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> |
| <echo |
| level="debug" |
| message="keyCfgFile: ${keyCfgFile}"/> |
| <property file="${keyCfgFile}"/> |
| <fail |
| unless="builderVersion" |
| message="Could not get builderVersion. Probably could not checkout build.cfg?"/> |
| |
| |
| <property |
| name="failOnError" |
| value="true"/> |
| |
| <!-- if application to run not set by caller, fail --> |
| |
| <fail |
| unless="appName" |
| message="Must provide appName to run"/> |
| |
| <!-- if application arguments have not been provided by caller, set to empty string --> |
| |
| <property |
| name="appArgs" |
| value=""/> |
| |
| <target name="runAppRunner"> |
| |
| <!-- long term we should make this sensitive to if already running in eclipse, and if so, |
| just invoke the script? check if="eclipse.running" --> |
| <mkdir dir="${buildDirectory}/${buildLabel}"/> |
| <mkdir dir="${buildDirectory}/${buildLabel}/buildworkspaces"/> |
| <java |
| taskname="AppRunner" |
| fork="true" |
| failonerror="${failOnError}" |
| classname="org.eclipse.equinox.launcher.Main"> |
| <classpath> |
| <fileset dir="${pde.builder.path}/plugins"> |
| <include name="org.eclipse.equinox.launcher_*.jar"/> |
| </fileset> |
| </classpath> |
| <jvmarg value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/> |
| <jvmarg value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplog-AppRunner.log"/> |
| <jvmarg value="-Dosgi.ws=${env.BASEWS}"/> |
| <jvmarg value="-Dosgi.os=${env.BASEOS}"/> |
| <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/> |
| <jvmarg value="-Dbuild.home=${env.BUILD_HOME}"/> |
| <jvmarg value="-DJAVA_6_HOME=${env.JAVA_6_HOME}"/> |
| <jvmarg value="-DJAVA_5_HOME=${env.JAVA_5_HOME}"/> |
| <jvmarg value="-DJAVA_4_HOME=${env.JAVA_4_HOME}"/> |
| |
| <jvmarg value="-Dprojectname=${projectname}"/> |
| <jvmarg value="-DbuildDirectory=${buildDirectory}"/> |
| <jvmarg value="-DbuildLabel=${buildLabel}"/> |
| <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> |
| <jvmarg value="-Dbuild.distribution=${build.distribution}"/> |
| <jvmarg value="-Dcomponent=${component}"/> |
| <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> |
| <jvmarg |
| value="-Dosgi.instance.area=${buildDirectory}/${buildLabel}/buildworkspaces/workspace-runAppRunner-${AppRunnerfile}-${AppRunnertarget}"/> |
| <arg value="-application"/> |
| <arg value="${appName}"/> |
| <arg line="${appArgs}"/> |
| |
| </java> |
| </target> |
| </project> |