Ant is the premiere build tool for Java developers, and this chapter
focuses on the Java build process, from compiling Java code with the
javac task through compressing and
packaging the results with tasks such as
Along the way, I’ll discuss several central build issues, such as keeping
track of the build number, storing that number in a JAR file’s manifest
file, getting input from the user and acting on that input, calling one
Ant target from another, creating Javadoc with the
javadoc task, and more.
javac task compiles
Java source code. You’ve seen
at work many times in this book but haven’t exhausted what this task has
to offer by any means. You can get an idea how extensive a task it is by
its huge number of attributes, shown in Table 3-1.
Specifies where to find any bootstrap class files.
Specifies where to find any bootstrap class files, given as a reference.
Specifies the classpath you want to use.
Specifies the classpath you want to use, given as a reference to a path.
Specifies the compiler you want to use. If you
don’t set this attribute, this task will use the compiler
pointed to by the
Specifies whether or not your code should be ...