Lets First understand ANT Terminology:
1.<Project> :
It is top level element in the ANT Script
It is has three optional attributes:
a.name b.default c.basedir
a.name: need to define the name of the project
b.default: default target use when no other target to supplied
c.basedir: It is where all path calculation are done
2.Target:
It is set of the task which you want to be executed.
Each project can be define zero or more target.Target can be depend on the another target.
Project can be have zero or more targets. when no target is given the project use the default target.
When the starting the ANT you can choose whichever target you want to be executed.
The main Targets are:
1.Clean: Clean up
2.Compile: Compile the source code
3.Dist: Generate the distribution
3.Task:
It is piece of the code which can be executed.It has multiple attributes.
There are so many task written for ANT.
ANT Task:
1.File Task: File task are copy,concat,mkdir,delete,get,replace,move,tempfile etc.
2.Compile Task: Compile task are javac,apt,rmic
3.Archive Task: Archive task are zip-unzip,jar-unjar,war-unwar
4.Testing Task: Teasting Task are junit,junitreport
5.Property Task: Property task are dirname,loadfile,propertyfile,uptodate
6.There are some other task are there like echo,javadoc,sql
4.Properties:
It has a name and a value,it's case sensitive.
The property name specify between the "${"property-name"}" and attribute value too.
No comments:
Post a Comment