Installation:
1. set the ant_home environment variable to point to this location.
2. set the java_home environment variable to point to the jdk location.
3. Add ant_home / bin to your system's path environment variable.
Build file:
1. $ {build.dir} means referenced a var: build.dir
2. Specify DireTory:
3. Make Dir On Specified DireTory:
target>
4. Clean Dir
target>
5. Compile Java Files
Description = "Compiles All Source Code."> destdir = "$ {build.classes}" /> target> 6. Jar Java Files Description = "generate oreilly.jar in the 'dist' Directory."> Basedir = "$ {build.classes}" Excludes = "** / * Test.class" /> target> 7. Target Can Be Invoked Single: EG. Command Line: Ant Jar 8. Specify ClassPath and Compile: javac> target> oral fileset> path> 9. Copy Files copy> 10. Javadoc SourcePath = "$ {src.dir}" Destdir = "$ {doc.dir} / API" Author = "True" Version = "True" Use = "true"> javadoc> target> ALL IN A Build.xml File: XML Version = "1.0"?> target> target> Description = "Compiles All Source Code."> target> Description = "generate oreilly.jar in the 'dist' Directory."> Basedir = "$ {build.classes}" Excludes = "** / * Test.class" /> target> Description = "Cleans, Compiles, Then Builds the Jar File." /> provject>