From 1cd764447cbd26e40fb0b78aaa4b4cf3398d2a9a Mon Sep 17 00:00:00 2001
From: Stefan Bodewig In order to find out which files should be compiled, Ant
+ compares the timestamps of the source files to those of the
+ resulting Say you have If your setup is different, Ant's heuristic won't work and
+ it will recompile classes that are up to date. Ant is not the
+ only tool, that expects a source tree layout like this. An incomplete DTD can be created by the
+ You can use a custom BuildListener, that sends out an email
in the buildFinished() method. Will Glozer
<will.glozer@jda.com> has written such a listener based
- on JavaMail, the source is Make sure that tar.gz
distribution file. Why?
+
+
+
+
+
+
+
+ Using Ant
+
+
+
+
@@ -155,6 +171,10 @@
+
+
+
+
+ Why does Ant always recompile all my Java files
+
+
+
+
+
+
+ .class
files. Opening all source files
+ to find out which package they belong to would be very
+ inefficient - instead of this, Ant expects you to place your
+ source files in a directory hierarchy that mirrors your
+ package hierarchy and to point Ant to the root of this
+ directory tree with the srcdir
attribute.<javac srcdir="src"
+ destdir="dest" />
. If Ant finds a file
+ src/a/b/C.java
it expects it to be in package
+ a.b
so that the resulting .class
+ file is going to be dest/a/b/C.class
.
@@ -430,7 +481,47 @@
-
+
+
+
+
+
+
+
+
+ Is there a DTD that I can use to validate my build
+ files?
+
+
+
+
+
+
+ <antstructure>
task - but this one
+ has a few problems:
+
+ <taskdef>
it won't know about it. See
+ this
+ page by Michel Casabianca for a solution to this
+ problem. Note that the DTD you can download at this page
+ is based on Ant 0.3.1.<test>
and
+ <junit>
tasks, there are two XML
+ elements named test (the task and the nested child element
+ of <junit>
) with different attribute
+ lists. This problem cannot be solved, DTDs don't give a
+ syntax rich enough to support this.
diff --git a/webpage/xdocs/faq.xml b/webpage/xdocs/faq.xml
index 84e72c902..28a0363aa 100644
--- a/webpage/xdocs/faq.xml
+++ b/webpage/xdocs/faq.xml
@@ -53,7 +53,7 @@
Tomcat.
@@ -525,7 +616,8 @@
@@ -715,6 +807,10 @@ ant -listener BuildMonitor
mail.jar
from JavaMail and
+ activation.jar
from the
+ Java
+ Beans Activation Framework in your CLASSPATH
.
The first version of Ant that was exposed a lager audience - was the one that shipped with Tomcat's 3.1 release on 19 April + was the one that shipped with Tomcat's 3.1 release on 19 April 2000. This version has later been referenced to as Ant 0.3.1.
@@ -112,6 +112,34 @@ +In order to find out which files should be compiled, Ant
+ compares the timestamps of the source files to those of the
+ resulting .class
files. Opening all source files
+ to find out which package they belong to would be very
+ inefficient - instead of this, Ant expects you to place your
+ source files in a directory hierarchy that mirrors your
+ package hierarchy and to point Ant to the root of this
+ directory tree with the srcdir
attribute.
Say you have <javac srcdir="src"
+ destdir="dest" />
. If Ant finds a file
+ src/a/b/C.java
it expects it to be in package
+ a.b
so that the resulting .class
+ file is going to be dest/a/b/C.class
.
If your setup is different, Ant's heuristic won't work and + it will recompile classes that are up to date. Ant is not the + only tool, that expects a source tree layout like this.
+ +An incomplete DTD can be created by the
+ <antstructure>
task - but this one
+ has a few problems:
<taskdef>
it won't know about it. See
+ this
+ page by Michel Casabianca for a solution to this
+ problem. Note that the DTD you can download at this page
+ is based on Ant 0.3.1.<test>
and
+ <junit>
tasks, there are two XML
+ elements named test (the task and the nested child element
+ of <junit>
) with different attribute
+ lists. This problem cannot be solved, DTDs don't give a
+ syntax rich enough to support this.You can use a custom BuildListener, that sends out an email in the buildFinished() method. Will Glozer <will.glozer@jda.com> has written such a listener based - on JavaMail, the source is
+ on JavaMail, + the source isMake sure that mail.jar
from JavaMail and
+ activation.jar
from the
+ Java
+ Beans Activation Framework in your CLASSPATH
.