So Ant In Action.
Build File contains ONE project.
Each project contains MULTIPLE targets.
Target contains tasks.
Tasks do the work.
You could invoke any of the tasks individually.
<target name="execute" depends="compile">
<java classname="org.antbook.welcome.Main" classpath="build/classes">
<arg value="a"/>
<arg value="b"/>
<arg file="."/>
</java>
</target>
ant -buildfile build.xml compile <==> ant compile
That's the default thing that I have been talking about, when you use ant without specifying build file name, ant will by default use file name build.xml.
Eclipse has a good integration with Ant, so you could invoke build.xml directly from Eclipse.
ant command-line options:
-help, -h: list the options Ant supports.
-Dproperty=value: set a property to a value. for example: ant -Dhost=localhost. set property host=localhost.
-buildfile
-keep-going, -k: when one target on the command line fails, still run other targets.
-logfile
-verbose, -v: Print verbose output for better debugging.
-diagnostics: Print information that might be helpful to diagnose or report problems.
-debug, -d: Print debugging information.
-logger
-propertyfile
-quiet, -q: Run a quiet build: only print errors.
Just as Java has classes and variables, Ant has datatypes and properties. Ant properties are immutable.
Ant allows flexibility in how Booleans can be specified with on, true, and yes.
${...} denotes a use of Ant property.
PATH, FILESET,