Skip to Main Content
Ant: The Definitive Guide, 2nd Edition
book

Ant: The Definitive Guide, 2nd Edition

by Steve Holzner
April 2005
Intermediate to advanced content levelIntermediate to advanced
336 pages
7h 20m
English
O'Reilly Media, Inc.
Content preview from Ant: The Definitive Guide, 2nd Edition

Executing External Programs

The exec task executes a system command or external program. The attributes for this task appear in Table 7-2.

Table 7-2. The exec task's attributes

Attribute

Description

Required

Default

append

Specifies whether you want to append to output and error files.

No

false

command

Deprecated. Use executable and nested arg elements. Specifies the command you want to run.

Exactly one of command or executable.

 

dir

Specifies the directory where you want to run the command.

No

 

error

Specifies the file where standard error output should be stored.

No

 

errorproperty

Specifies the name of a property where you want to store errors.

No

 

executable

Specifies the command you want to run (without any command-line arguments).

Exactly one of command or executable.

 

failifexecutionfails

Specifies the build should be stopped if the executable can't start.

No

true

failonerror

Specifies the build should be stopped if the task encounters errors.

No

false

input

Specifies the file where the task should take input to run the executable with.

No

 

inputstring

Specifies a string holding the input stream for the executable to run.

No

 

logError

Specifies you want to send error output to Ant's log.

No

 

newenvironment

Specifies old environment variables should not be passed as new environment variables to a forked JVM.

No

false

os

Specifies the operating systems in which the executable can be run.

No

 

output

Specifies the name of a file in which to store the output.

No

 

outputproperty ...

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.
Start your free trial

You might also like

Ant: The Definitive Guide

Ant: The Definitive Guide

Eric M. Burke, Jesse Tilly
Tomcat: The Definitive Guide, 2nd Edition

Tomcat: The Definitive Guide, 2nd Edition

Jason Brittain, Ian F. Darwin
Ant in Action

Ant in Action

Erik Hatcher, Steve Loughran
CMake Cookbook

CMake Cookbook

Radovan Bast, Roberto Di Remigio

Publisher Resources

ISBN: 0596006098Supplemental ContentErrata Page