1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
.TH build.xml 5 "February 2010" "Debian GNU/Linux"
.SH NAME
build.xml \- configuration file used by ant to build projects
.SH DESCRIPTION
The file
.B build.xml
is the default configuration file used by
.B ant
to determine target to build for a specific project. It can be
considered the ant equivalent of Makefile.
The format of
.B ant
is XML and for each project a separate file is constructed.
The buildfile consists of one or more tasks. An example is
given below.
<project default="compile">
<target name="compile">
<javac srcdir="src"/>
</target>
</project>
This example has one target and it is defaulted. The target itself
consists of one task
.B javac
which compiles the files in the \fIsrc\fR directory.
.SH TARGETS
Targets can depend on other targets. These dependencies are given by
the \fIdepends\fR attribute of the <\fItarget\fR> element.
.SH TASKS
A task is a piece of code that is executed.
.B Ant
recognizes built-in task, optional tasks, but one can also write new
tasks.
.B Built-in tasks
The built-in tasks are: \fIAnt\fR, \fIAntCall\fR, \fIAntStructure\fR,
\fIAntVersion\fR, \fIApply\fR, \fIApt\fR, \fIAvailable\fR, \fIBasename\fR,
\fIBuildNumber\fR, \fIBUnzip2\fR, \fIBZip2\fR, \fIChecksum\fR, \fIChmod\fR,
\fIConcat\fR, \fICondition\fR, \fICopy\fR, \fIComponentdef\fR, \fICvs\fR,
\fICvsChangeLog\fR, \fICvsVersion\fR, \fICVSPass\fR, \fICvsTagDiff\fR,
\fIDefaultexcludes\fR, \fIDelete\fR, \fIDeltree\fR, \fIDependset\fR,
\fIDiagnostics\fR, \fIDirname\fR, \fIEar\fR, \fIEcho\fR, \fIEchoXML\fR,
\fIExec\fR, \fIFail\fR, \fIFilter\fR, \fIFixCRLF\fR, \fIGenKey\fR, \fIGet\fR,
\fIHostInfo\fR, \fIGUnzip\fR, \fIGZip\fR, \fIImport\fR, \fIInclude\fR,
\fIInput\fR, \fIJar\fR, \fIJava\fR, \fIJavac\fR, \fIJavadoc\fR, \fILength\fR,
\fILoadFile\fR, \fILoadProperties\fR, \fILoadResource\fR, \fILocal\fR,
\fIMakeURL\fR, \fIMail\fR, \fIMacroDef\fR, \fIManifest\fR, \fIManifestClassPath\fR,
\fIMkdir\fR, \fIMove\fR, \fINice\fR, \fIParallel\fR, \fIPatch\fR,
\fIPathConvert\fR, \fIPreSetDef\fR, \fIProperty\fR, \fIPropertyHelper\fR,
\fIRecord\fR, \fIReplace\fR, \fIResourceCount\fR, \fIRetry\fR, \fIRmic\fR,
\fISequential\fR, \fISignJar\fR, \fISleep\fR, \fISql\fR, \fISubAnt\fR,
\fISync\fR, \fITar\fR, \fITaskdef\fR, \fITempfile\fR, \fITouch\fR,
\fITruncate\fR, \fITStamp\fR, \fITypedef\fR, \fIUnjar\fR, \fIUntar\fR,
\fIUnwar\fR, \fIUnzip\fR, \fIUptodate\fR, \fIWaitfor\fR, \fIWhichResource\fR,
\fIWar\fR, \fIXmlProperty\fR, \fIXSLT\fR, \fIZip\fR
.TP
\fBJava\fR
Executes a Java class within the running (Ant) VM or forks another VM if
specified. Below are some of the attibutes to the <\fIjava\fR> element:
.B classname
(required) the Java class to execute
.B fork
if enabled triggers the class execution in another VM (disabled by default)
.B jvm
the command used to invoke the Java Virtual Machine, default is
\fIjava\fR. The command is resolved by java.lang.Runtime.exec().
Ignored if fork is disabled.
Other arguments are \fIclasspath\fR, \fIclasspathref\fR, \fImaxmemory\fR,
\fIfailonerror\fR, \fIdir\fR and \fIoutput\fR.
.TP
\fBJavac\fR
Compiles a source tree within the running (Ant) VM.
.B srcdir
(required) location of the java files
.B destdir
location to store the class files
.B debug
indicates whether source should be compiled
with debug information; defaults to off
.B optimize
indicates whether source should be compiled
with optimization; defaults to off
.B target
generate class files for specific VM version
(e.g., 1.1 or 1.2).
.B includes
comma-separated list of patterns of files that
must be included; all files are included when omitted
.B excludes
comma-separated list of patterns of files that
must be excluded; no files (except default
excludes) are excluded when omitted.
.B defaultexcludes
indicates whether default excludes should be
used (yes | no); default excludes are used
when omitted.
Other arguments are \fIincludesfile\fR, \fIexcludesfile\fR,
\fIclasspath\fR, \fIbootclasspath\fR, \fIclasspathref\fR,
\fIbootclasspathref\fR, \fIextdirs\fR, \fIencoding\fR,
\fIdeprecation\fR, \fIverbose\fR, \fIincludeAntRuntime\fR,
\fIincludeJavaRuntime\fR and \fIfailonerror\fR.
.SH Properties
A project can have a set of properties, which consist of a name value
combination. Within tasks they can be used by placing them between
"${" and "}", as in "${builddir}/classes".
.B Built-in Properties
Ant provides access to all system properties as if they had been defined
using a <\fIproperty\fR> task. For example, ${os.name} expands to the name of
the operating system.
.TP
\fBbasedir\fR
the absolute path of the project's basedir (as set
with the basedir attribute of <project>).
.TP
\fBant.file\fR
the absolute path of the buildfile.
.TP
\fBant.version\fR
the version of Ant.
.TP
\fBant.project.name\fR
the name of the project that is currently executing;
it is set in the name attribute of <project>.
.TP
\fBant.java.version\fR
the JVM version Ant detected; currently it can hold
the values "1.1", "1.2" and "1.3".
.SH Classpath
The classpath can be set by using the <\fIclasspath\fR>
element:
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="lib/helper.jar"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
.SH SEE ALSO
.BR ant (1)
.SH AUTHOR
This manpage is made by Egon Willighagen <egonw@sci.kun.nl>
and based on the Ant Manual <\fIhttp://jakarta.apache.org/ant/manual/\fR>.
|