java - Ant shortcut for specifying source/version in several different javac tasks -
when using ant, there way specify set of attribute/value pairs can passed different tasks single item/variable?
i have ant build file includes several different javac tasks. have same values several attributes (source, version, bootclasspath, debug, etc.)
i know can set variable each attribute; but, there way can refer entire group of attributes can this
<javac ${standard_attributes} ...>
instead of
<javac debug="on" includeantruntime="false" source="${java_version}" target="${java_version}" bootclasspath="${bcp}" ...
in every javac task?
use presetdef
<presetdef name="standard-javac"> <javac debug="on" includeantruntime="false" source="${java_version}" target="${java_version}" bootclasspath="${bcp}" ... </javac> </presetdef>
and use standard-javac
task in places used put javac
.
Comments
Post a Comment