We always say that tools are not important, but it is always a good idea to have some understanding of tools so we can perform operations and troubleshoot in an easy manner.
Ant uses the build.xml
file to execute different tasks that lead to the creation of a package
file.
We will use a sample project for Ant that is available at https://github.com/mitesh51/AntExample.
Its build.xml
file contains the following details:
<?xml version="1.0" ?> <project name="AntExample1" default="war"> <path id="compile.classpath"> <fileset dir="WebContent/WEB-INF/lib"> <include name="*.jar"/> </fileset> </path> <target name="init"> <mkdir dir="build/classes"/> <mkdir dir="dist" /> </target> <target name="compile" depends="init"> <javac destdir="build/classes" debug="true" srcdir="src"> <classpath refid="compile.classpath"/> </javac>...