I'm trying to override ant's compiler attribute via the command line so that all javac tasks occur using my specified compiler. The problem I've run into is that any target that sets its own value for compiler overrides the one that I set at the commmand line. So, even though I'm entering the following command.
ant -Dbuild.compiler=mycompiler
Any target that has the following is going to use the modern compiler instead of mycompiler because of that compiler="modern" attribute
<javac srcdir="." destdir="${classes.dir}/core" compiler="modern" encoding="UTF-8"> <include name="org/**" /> <include name="com/**" /> <compilerarg line="${config.build.compilerarg}" /> </javac>
Is there any way to override this from the command line or am I stuck editing the build file?