Java Reference
In-Depth Information
Example 9.4 The build.xml file for the Payback application
<?xml version="1.0"?>
<!--
$Id: 070_antIntro.sgml,v 1.51 2004/04/13 05:10:45 mschwarz Exp $
Buildfile for the Payback program. Payback will calculate
the length of time and real amount of money it takes to make a
purchase using various savings or credit accounts. -->
<project name="Payback" default="all" basedir=".">
<!-- The "init" target sets up properties used throughout
the buildfile. -->
<target name="init" description="Sets build properties">
<echo>Running INIT</echo>
<property name="src" value="${basedir}/src"/>
<property name="build" value="${basedir}/build"/>
<property name="doc" value="${basedir}/doc"/>
</target>
<!-- The "all" target does nothing but tie together the "jar" and
"doc" targets. -->
<target name="all" depends="jar,doc"
description="Pseudo-target that builds JAR and Javadoc">
<echo>Building ALL</echo>
</target>
<!-- The "build" target compiles the code in the project. -->
<target name="build" depends="init"
description="Compiles the classes">
<echo>Running BUILD</echo>
<mkdir dir="${build}"/>
<javac destdir="${build}" srcdir="${src}" debug="true"
deprecation="true"/>
</target>
<!-- The "doc" target generates Javadoc documentation of the
project. The "author", "version", and "use" attributes set to
true cause those Javadoc tags to be used in the final document.
The "private" attribute set to true causes private methods and
attributes to be included in the documentation. We tend to use
this for projects to provide complete reference documentation.
You would probably not want to do this for an app or lib
distributed as a JAR file only. -->
Search WWH ::




Custom Search