ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dIon Gillard <>
Subject Re: How to tell if a Ant build script is running in Eclipse?
Date Sat, 16 Feb 2002 15:25:28 GMT
Jiang, Bianca wrote:

>I had this compiler problem when running Ant in Eclipse.  Then found 
>the workaround of adding one property to the build file to make it work:
><property name="build.compiler"
>But it's only helps if the script is generic and can
>work the same both in and out Eclipse.  So anybody
>knows if there is a way to check if the build script
>is running inside Eclipse or not so that can set the
>property conditionally?
I posted a few ant targets to do exactly that on the eclipse newsgroups 
a few months ago. Bottom line, use a target to set a property based on 
whether the class org.eclipse.pde.internal.core.JDTCompilerAdapter 
exists (check_wsad target). Use that property on the 'if' of the target 
that sets build.compiler, as above (set_compiler target). Make init 
dependent on the set_compiler target.

dIon Gillard, Multitask Consulting

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message