Chapter 7. Tasks
Prev | Ant Coding Style Guidelines | Next

## 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"/>

Prev | Up | Next
Chapter 6. Targets | Home | Chapter 8. Comments