build.xml

NAME

build.xml - configuration file used by ant to build projects

DESCRIPTION

The file build.xml is the default configuration file used by ant to determine target to build for a specific project. It can be considered the ant equivalent of Makefile. The format of 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 javac which compiles the files in the src directory.

TARGETS

Targets can depend on other targets. These dependencies are given by the depends attribute of the <target> element.

TASKS

A task is a piece of code that is executed. Ant recognizes built-in task, optional tasks, but one can also write new tasks. Built-in tasks The built-in tasks are: Ant, AntCall, AntStructure, Apply, Available, Basename, BuildNumber, BUnzip2, BZip2, Checksum, Chmod, Concat, Condition, Copy, Cvs, Delete, Deltree, Dirname, Ear, Echo, Exec, Fail, Filter, FixCRLF, GenKey, Get, GUnzip, GZip, Import, Input, Jar, Java, Javac, Javadoc, Length, LoadFile, LoadProperties, Mail, Mkdir, Move, Nice, Parallel, Patch, PathConvert, Property, Record, Replace, Rmic, Sequential, SignJar, Sleep, Sql, Style, Subant, Sync, Tar, Taskdef, Tempfile, Touch, TStamp, Typedef, Unjar, Untar, Unwar, Unzip, Uptodate, Waitfor, War, WhichResource, XmlProperty, Xslt, Zip
Java
Executes a Java class within the running (Ant) VM or forks another VM if specified. Below are some of the attibutes to the <java> element: classname (required) the Java class to execute fork if enabled triggers the class execution in another VM (disabled by default) jvm the command used to invoke the Java Virtual Machine, default is java. The command is resolved by java.lang.Runtime.exec(). Ignored if fork is disabled. Other arguments are classpath, classpathref, maxmemory, failonerror, dir and output.
Javac
Compiles a source tree within the running (Ant) VM. srcdir (required) location of the java files destdir location to store the class files debug indicates whether source should be compiled with debug information; defaults to off optimize indicates whether source should be compiled with optimization; defaults to off target generate class files for specific VM version (e.g., 1.1 or 1.2). includes comma-separated list of patterns of files that must be included; all files are included when omitted excludes comma-separated list of patterns of files that must be excluded; no files (except default excludes) are excluded when omitted. defaultexcludes indicates whether default excludes should be used (yes | no); default excludes are used when omitted. Other arguments are includesfile, excludesfile, classpath, bootclasspath, classpathref, bootclasspathref, extdirs, encoding, deprecation, verbose, includeAntRuntime, includeJavaRuntime and failonerror.

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". Built-in Properties Ant provides access to all system properties as if they had been defined using a <property> task. For example, ${os.name} expands to the name of the operating system.
basedir
the absolute path of the project's basedir (as set with the basedir attribute of <project>).
the absolute path of the buildfile.
ant.version
the version of Ant.
ant.project.name
the name of the project that is currently executing; it is set in the name attribute of <project>.
ant.java.version
the JVM version Ant detected; currently it can hold the values "1.1", "1.2" and "1.3".

Classpath

The classpath can be set by using the <classpath> element: <classpath> <pathelement path="${classpath}"/> <pathelement location="lib/helper.jar"/> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </classpath>

SEE ALSO

ant(1)

AUTHOR

This manpage is made by Egon Willighagen <egonw@sci.kun.nl> and based on the Ant Manual <http://jakarta.apache.org/ant/manual/>.
Vitalia.cz: Kam zmizela půlka ryby?

Kam zmizela půlka ryby?

120na80.cz: Odřenina. Jakou použít dezinfekci?

Odřenina. Jakou použít dezinfekci?

Podnikatel.cz: Alza radí e-shopům, jak opustit Heureku

Alza radí e-shopům, jak opustit Heureku

Vitalia.cz: Utrhli jste kusadla? Nevadí

Utrhli jste kusadla? Nevadí

120na80.cz: Končí pylová sezona břízy a začíná sezona trav

Končí pylová sezona břízy a začíná sezona trav

Vitalia.cz: Grilujte v parku i na loďce

Grilujte v parku i na loďce

Vitalia.cz: 10 rad šéfkuchařů pro perfektní grilování

10 rad šéfkuchařů pro perfektní grilování

Vitalia.cz: Před, nebo po snídani? Kdy je lepší čistit si zuby

Před, nebo po snídani? Kdy je lepší čistit si zuby

DigiZone.cz: Panasonic v Praze uvedl TV pro rok 2016

Panasonic v Praze uvedl TV pro rok 2016

Podnikatel.cz: Různé podoby lahve Coca–Coly. Úchvatné

Různé podoby lahve Coca–Coly. Úchvatné

Vitalia.cz: 7 nemocí očí, které musíte léčit včas

7 nemocí očí, které musíte léčit včas

DigiZone.cz: Rádio Retro spouští stream o Karlu IV.

Rádio Retro spouští stream o Karlu IV.

Měšec.cz: Udali ho na nelegální software a přišla Policie

Udali ho na nelegální software a přišla Policie

Vitalia.cz: Mražené ryby z Makra byly falšované

Mražené ryby z Makra byly falšované

120na80.cz: 10 dezinfekcí: Vede „starý dobrý“ peroxid

10 dezinfekcí: Vede „starý dobrý“ peroxid

Podnikatel.cz: Šizený guláš na pultě. Jako Lidl to nedělejte

Šizený guláš na pultě. Jako Lidl to nedělejte

Vitalia.cz: Falšovaný salám v Kauflandu

Falšovaný salám v Kauflandu

Vitalia.cz: Kupujete český česnek? Je to trik

Kupujete český česnek? Je to trik

120na80.cz: Jak si udržet zdravou vaginu

Jak si udržet zdravou vaginu

Lupa.cz: Je IoT bezpečnostní noční můra?

Je IoT bezpečnostní noční můra?