[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-ant-dev] build.compiler problem in Eclipse
|
>
>Is there a way to tell from the build file whether it is running inside or
>out of Eclipse, so that we can set the property conditionally?
You could try to use the following :
check_eclipse/set_eclipse.
It may works on your system, but it fail on my W2K/E2 20020214,
with Sun SDK 1.3.1 :
Reported in bug #10100
http://bugs.eclipse.org/bugs/show_bug.cgi?id=10100
--->
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="CP Project" default="all" basedir=".">
<!-- =================================================================== -->
<!-- Pre-Init -->
<!-- =================================================================== -->
<property file="${user.home}/.ant.properties" />
<target name="check_eclipse">
<available property="in.eclipse" classname="org.eclipse.ant.core.EclipseJavac" />
</target>
<target name="set_eclipse" if="in.eclipse" depends="check_eclipse">
<property name="build.compiler" value="org.eclipse.pde.internal.core.JDTCompilerAdapter" />
<echo message="Internal Eclipse Compiler will be used" />
</target>
<target name="set_jikes" unless="in.eclipse" depends="check_eclipse">
<property name="build.compiler" value="jikes" />
<echo message="Jikes Compiler will be used" />
</target>
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init" depends="check_eclipse, set_eclipse, set_jikes">
<tstamp/>
....