I\'m trying to override Ant compiler attributes via the command line so that all \'javac\' tasks use my specified compiler. The problem I\'ve run into is that any target tha
The Ant javac task documentation says:
It is possible to use different compilers. This can be specified by either setting the global build.compiler property, which will affect all tasks throughout the build, or by setting the compiler attribute, specific to the current task. Valid values for either the build.compiler property or the compiler attribute are:
It sounds as if you can either specify the global build.compiler property or set a specific compiler attribute.
So, it looks like you will need to modify your build file and either:
remove the compiler attribute from the javac calls and allow the global build.compiler setting to cascade down
change the values of the compiler attribute from a hard-coded string compiler="modern" to be property compiler="${javac.compiler}"