Name
apply
Synopsis
Executes a system command. As of Ant 1.4, the deprecated
execon task is merely an alias for
apply. Unlike the exec task,
this task requires a nested <fileset>
specifying one or more files and directories as arguments to the
command.
Attributes
-
dest(1.3, 1.4, File, *) The destination directory for any target files generated by the command.
-
dir(1.3, 1.4, File, N) The working directory for the command.
-
executable(1.3, 1.4, String, Y) The name of the command to execute. Does not include command-line arguments.
-
failonerror(1.3, 1.4, boolean, N) If
true, the build fails when the command returns anything other than 0. Defaults tofalse.-
newenvironment(1.3, 1.4, boolean, N) If
true, do not propagate existing environment variables to the new process. Defaults tofalse.-
os(1.3, 1.4, String, N) A list of operating systems this task applies to. Executes only if the list contains a string matching the return value from
System.getProperty("os.name").-
output(1.3, 1.4, File, N) A file to redirect the command output to.
-
outputproperty(1.4, String, N) The name of a property that stores the command output.
-
parallel(1.3, 1.4, boolean, N) If
true, the command is executed once, passing all files as arguments. Iffalse, the command is executed once for each file. Defaults tofalse.-
skipemptyfilesets(1.4, boolean, N) If
true, do not execute the command if no source files are found, or if source files are up-to-date with respect to destination files. Defaults tofalse.-
timeout(1.3, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access