Please enable JavaScript.
Coggle requires JavaScript to display documents.
Apache Ant (why build automation (this has best practices, less mistakes,…
Apache Ant
-
-
structure
project
name > resembles the name of the project
basedir > This is the directory from where all paths will be calculated. This can
be overridden by using a “basedir” property. If both of these values are not set
then “basedir“ value is the directory of the build file.
default > Defines the default target for this project. If no target is provided then
it will execute the “default” target
target
name > name of the target (Required)
description > Description for the target (NR)
depends > Which target this current target depends upon. A comma separated list.
if > Execute target if value is set for a property
unless > Execute the target if property value is not set
extensionOf > added from 1.8 (check next slide)
onMissingExtensionPoint > added from 1.8 (check next slide)
task
file tasks
<copy>, <concat>, <delete>, <filter>, <fixcrlf>, <get>
compile tasks
<javac>
– Compiles the specified source file(s) within the running (Ant) VM, or in another
VM if the fork attribute is specified.
– <apt>
– Runs the annotation processor tool (apt), and then optionally compiles the
original code, and any generated source code.
– <rmic>
– Runs the rmic compiler
archive tasks
<zip>, <unzip>
– Creates a zipfile.
– <jar>, <unjar>
– Jars a set of files.
– <war>, <unwar>
– An extension of the Jar task with special treatment web archive dirs.
– <ear>
– An extension of the Jar task with special treatment enterprise archive dirs.
-
Property
-
• name > the name of the property to set.
• value > the value of the property.
• location > Sets the property to the absolute filename of the given file.
• file > the location of the properties file to load.
• resource > the name of the classpath resource containing properties
settings in properties file format.
• classpath > the classpath to use when looking up a resource.
• environment > environment the prefix to use when retrieving
environment variables. An example is given in build2.xml