You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
4.5 KiB
166 lines
4.5 KiB
.TH build.xml 5 "April 2001" "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 seperate 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, |
|
\fIApply\fR, \fIAvailable\fR, \fIChmod\fR, \fICopy\fR, \fICvs\fR, |
|
\fIDelete\fR, \fIDeltree\fR, \fIEcho\fR, \fIExec\fR, \fIExecOn\fR, |
|
\fIFail\fR, \fIFilter\fR, \fIFixCRLF\fR, \fIGenKey\fR, \fIGet\fR, |
|
\fIGUnzip\fR, \fIGZip\fR, \fIJar\fR, \fIJava\fR, \fIJavac\fR, |
|
\fIJavadoc/Javadoc2\fR, \fIMail\fR, \fIMkdir\fR, \fIMove\fR, \fIPatch\fR, |
|
\fIProperty\fR, \fIReplace\fR, \fIRmic\fR, \fISignJar\fR, \fISql\fR, |
|
\fIStyle\fR, \fITar\fR, \fITaskdef\fR, \fITouch\fR, \fITStamp\fR, \fIUnjar\fR, |
|
\fIUntar\fR, \fIUnwar\fR, \fIUnzip\fR, \fIUptodate\fR, \fIWar\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.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>.
|
|
|