To do this, you can use a system property for the ant process (-D).
-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
or a task in ant to initialize it. This task you must be called before every other tasks.
<project name="spring-core" default="traduction" basedir=".">
<target name="eclipse" if="eclipse.running">
<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter" />
</target>
<target name="page-preface" depends="eclipse" description="overview">
...
</target>
...
</project>