Here is some information about how we use ANT at my workplace. The company I work at was kind enough to let me present this information here as I wanted to try to provide some information back to help other people using these great tools that are, mostly, created and maintained by volunteers. This is just one way to do things; it is tied to my work environment and not meant to be a general "one size fits all" resource, but hopefully a good place for some ideas. Also, it's good to describe it as documentation for the future and to make things clear for myself anyway :)
If you have some feedback of any kind, feel free to post in the Development Automation and Code Quality forums
ANT at a glance - a quick intro to what ANT is
Description of our build system
Using our build system from projects
Common Build Targets - an "API" to the targets
To use any of the common tasks, you need to set some properties at the start of each build file (either in the build file or in an included properties file).
The most common and important ones are:
PMD - static code analysis
FindBugs - compiled code analysis
JUnit - junit test runner
Clover - code coverage for junit run tests
JavaNCSS - source code metrics
JDepend - show code dependencies
XMLTask - XML handling
These tasks have been written to provide helpful utilities through ANT (also within WSAD).
ClasspathTask - obtain a simple WSAD projects classpath
ApplyDriveLetterTask - obtains the current drive letter of where the project exists and updates/prefixes the given property value with this
J2EEClasspathTask - obtain the classpath from a WSAD project in a J2EE application. This will also get the output directory of any referenced project as well
JDependHelperTask - help modify GraphViz output to produce a graphical dependency diagram of the components
ListAllJavaFilesTask - produce a listing of all of the Java files in a workspace
NNTPTask - send a message to a news server using NNTP
SerialVerTask - create a serialVersionUID for a class
The Java source files for these tasks can be downloaded here
http://ant.apache.org - the home of ANT. This always shows the latest info
DeadEd.com
http://www.deaded.com/staticpages/index.php/anantbuildsystem