Chapter 7. Tasks

Avoid use of the "exec" task if possible as this reduces portability.

This is bad as it assumes that the 'tar' utility is installed on the current path:


    <exec executable="tar" dir="${java.tmp.dir}/libraries">
        <arg line="-xzf ${build_dir}/${libraries_tar}"/>
    </exec>

This is good:


    <untar src="${build_dir}/${libraries_tar}" compression="gzip"
        dest="${java.tmp.dir}/libraries"/>