@@ -180,20 +180,24 @@
build file?
</a></li>
<li><a href="#jikes-switches">
How can I use Jikes specific command line
How can I use Jikes-specific command- line
switches?
</a></li>
<li><a href="#shell-redirect-1">
How do I include a < character in my command line arguments?
How do I include a < character in my command- line arguments?
</a></li>
<li><a href="#shell-redirect-2">
How do I redirect standard input or standard output
in the <code><exec></code> task?
</a></li>
<li><a href="#batch-shell-execute">
How do I execute a batch file or shell script from Ant?
</a></li>
<li><a href="#defaultexcludes">
I've made a <delete> task to delete unwanted
sourcesafe control files (CVS files, editor backup files), but
it doesn't seem to work. The files never get deleted. What's
I've used a <code><delete></code> task to delete
unwanted
SourceSafe control files (CVS files, editor backup files, etc.), but
it doesn't seem to work; the files never get deleted. What's
wrong?
</a></li>
<li><a href="#multi-conditions">
@@ -201,16 +205,16 @@
multiple conditions are true.
</a></li>
<li><a href="#stop-dependency">
I have a target I want to skip if a variable is set,
so I have <code>unless="variable "</code> as an attribute
of the target. The trouble is that all of the targets that this target
I have a target I want to skip if a property is set,
so I have <code>unless="property "</code> as an attribute
of the target, but all the targets this target
depends on are still executed. Why?
</a></li>
<li><a href="#include-order">
In my fileset, I've put in an
In my <code>< fileset></code> , I've put in an
<code><exclude></code> of all files followed by an
<code><include></code> of just the files I want, but it
isn't giving me anything at all. What's wrong?
isn't giving me any files at all. What's wrong?
</a></li>
</ul>
@@ -231,7 +235,7 @@
</a></li>
<li><a href="#emacs-mode">
Why doesn't (X)Emacs/vi/MacOS X's project builder
parse the error messages generated by Ant correctly ?
correctly parse the error messages generated by Ant?
</a></li>
</ul>
</blockquote>
@@ -240,7 +244,7 @@
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>Advanced i ssues</strong>
<strong>Advanced I ssues</strong>
</font>
</td></tr>
<tr><td>
@@ -268,14 +272,14 @@
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>Known p roblems</strong>
<strong>Known P roblems</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<ul>
<li><a href="#remove-cr">
<chmod> or <exec> don't work in Ant
<chmod> or <exec> does n't work in Ant
1.3 on Unix
</a></li>
<li><a href="#javadoc-cannot-execute">
@@ -329,8 +333,8 @@
<p>The page you are looking it is generated from
<a href="http://cvs.apache.org/viewcvs.cgi/~checkout~/jakarta-ant/xdocs/faq.xml">this</a>
document. If you want to add a new question, please submit
a patch against this document to one of Ant's mailing lists,
the structure is hoped to be self-explaining .</p>
a patch against this document to one of Ant's mailing lists;
hopefully, the structure is self-explanatory .</p>
<p>If you don't know how to create a patch, see the patches
section of <a href="http://jakarta.apache.org/site/source.html">this
page</a>.</p>
@@ -376,8 +380,8 @@
</td></tr>
<tr><td>
<blockquote>
<p> Ant is a Java based build tool. In theory it is kind of
like "make" without make s wrinkles and with the full
<p> Ant is a Java-based build tool. In theory, it is kind of
like Make, without Make' s wrinkles and with the full
portability of pure Java code.</p>
</blockquote>
</td></tr>
@@ -394,13 +398,13 @@
</td></tr>
<tr><td>
<blockquote>
<p>According to Ant's original author James Duncan
<p>According to Ant's original author, James Duncan
Davidson, the name is an acronym for "Another Neat
Tool".</p>
<p>Later explanations go along the lines of "Ants are
doing an extremely good job at building things" or
"Ants are very small and can carry a weight a dozen times
of their own" - describing what Ant is intended to
<p>Later explanations go along the lines of "ants
do an extremely good job at building things", or
"ants are very small and can carry a weight dozens of times
their own" - describing what Ant is intended to
be.</p>
</blockquote>
</td></tr>
@@ -417,25 +421,25 @@
</td></tr>
<tr><td>
<blockquote>
<p>Initially Ant was part of the Tomcat code base when it was
donated to the Apache Software Foundation - it has been
created by James Duncan Davidson, who also is the original
<p>Initially, Ant was part of the Tomcat code base, when it was
donated to the Apache Software Foundation. It was
created by James Duncan Davidson, who is also the original
author of Tomcat. Ant was there to build Tomcat, nothing
else.</p>
<p>Soon thereafter several open source Java projects realized
that Ant could solve the problems they had with m akefiles.
<p>Soon thereafter, several open source Java projects realized
that Ant could solve the problems they had with M akefiles.
Starting with the projects hosted at Jakarta and the old Java
Apache project, Ant spread like a virus and now is the build
Apache project, Ant spread like a virus and is now the build
tool of choice for a lot of projects.</p>
<p>In January 2000 Ant was moved to a separate CVS module and
<p>In January 2000, Ant was moved to a separate CVS module and
was promoted to a project of its own, independent of
Tomcat. Ant became Apache Ant.</p>
<p>The first version of Ant that was exposed a lager audience
Tomcat, and became Apache Ant.</p>
<p>The first version of Ant that was exposed to a lar ger audience
was the one that shipped with Tomcat's 3.1 release on 19 April
2000. This version has later been referenc ed to as Ant
2000. This version has later been referr ed to as Ant
0.3.1.</p>
<p>The first official release of Ant as a stand alone product was
Ant 1.1 released on 19 July 2000. The complete release
<p>The first official release of Ant as a stand- alone product was
Ant 1.1, released on 19 July 2000. The complete release
history:</p>
<table>
<tr>
@@ -550,7 +554,7 @@
version of tar (for example, the one shipping with Solaris),
you cannot use it to extract the archive.</p>
<p>The solution is to either install GNU tar, which can be
found <a href="http://www.gnu.org/software/tar/tar.html">here</a>
found <a href="http://www.gnu.org/software/tar/tar.html">here</a>,
or use the zip archive instead (you can extract it using
<code>jar xf</code>).</p>
</blockquote>
@@ -572,18 +576,26 @@
compares the timestamps of the source files to those of the
resulting <code>.class</code> 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
inefficient. Instead , 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 <code>srcdir</code> attribute.</p>
<p>Say you have <code><javac srcdir="src"
destdir="dest" /></code>. If Ant finds a file
<code>src/a/b/C.java</code> it expects it to be in package
destdir="dest"/></code>. If Ant finds a file
<code>src/a/b/C.java</code>, it expects it to be in package
<code>a.b</code> so that the resulting <code>.class</code>
file is going to be <code>dest/a/b/C.class</code>.</p>
<p>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.</p>
<p>If your source-tree directory structure does not match your
package structure, 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.</p>
<p>If you have Java source files that aren't declared to
be part of any package, you can still use the <code><javac></code>
task to compile these files correctly - just set the
<code>srcdir</code> and <code>destdir</code> attributes to
the actual directory the source
files live in and the directory the class files should go into,
respectively.</p>
</blockquote>
</td></tr>
</table>
@@ -600,11 +612,12 @@
</td></tr>
<tr><td>
<blockquote>
<p>Use properties: <code>ant
-D<name>=<value></code> lets you define values for
properties. These can then be used within your build file as
any normal property: <code>${<name>}</code> will put in
<code><value></code>.</p>
<p>Use properties. Using <code>ant
-D<em>name</em>=<em>value</em></code> lets you define values for
properties on the Ant command line. These properties can then be
used within your build file as
any normal property: <code>${<em>name</em>}</code> will put in
<code><em>value</em></code>.</p>
</blockquote>
</td></tr>
</table>
@@ -614,14 +627,14 @@
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How can I use Jikes specific command line
How can I use Jikes-specific command- line
switches?
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>A couple of switches are supported via magic
<p>A couple of switches are supported via " magic"
properties:</p>
<table>
<tr>
@@ -708,8 +721,10 @@
<td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
<strong>only for Ant < 1.4, replaced by the nowarn
attribute of javac after that</strong> -nowarn
<strong>(Only for Ant < 1.4; replaced by the
<code><strong>nowarn</strong></code>
attribute of the <code><strong><javac></strong></code>
task after that.)</strong><br />-nowarn
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan=""
@@ -735,16 +750,16 @@
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I include a < character in my command line arguments?
How do I include a < character in my command- line arguments?
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>The short answer is "Use <code>&lt;</code>".</p>
<p>The long answer is, that this probably won't do what you
want anyway, see <a href="#shell-redirect-2">the next
section</a>.</p>
<p>The short answer is "Use: <code>&lt;</code>".</p>
<p>The long answer is that this probably won't do what you
want anyway ( see <a href="#shell-redirect-2">the next
section</a>) .</p>
</blockquote>
</td></tr>
</table>
@@ -763,7 +778,7 @@
<blockquote>
<p>Say you want to redirect the standard input stream of the
<code>cat</code> command to read from a file, something
like</p>
like: </p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -810,7 +825,7 @@ shell-prompt> cat < foo
</tr>
</table>
</div>
<p>This will not do what you expect. The input- redirection is
<p>This will not do what you expect. The input redirection is
performed by your shell, not the command itself, so this
should read:</p>
<div align="left">
@@ -837,8 +852,78 @@ shell-prompt> cat < foo
</tr>
</table>
</div>
<p>Note, that you must use the <code>value</code> attribute of
<code><arg></code> in the last element.</p>
<p>Note that you must use the <code>value</code> attribute of
<code><arg></code> in the last element, in order to have
the command passed as a single, quoted argument. Alternatively,
you can use:</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
<exec executable="/bin/sh">
<arg line='-c "cat &lt; foo"'/>
</exec>
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>Note the double-quotes nested inside the single-quotes.</p>
</blockquote>
</td></tr>
</table>
</a>
<a name="batch-shell-execute">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I execute a batch file or shell script from Ant?
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Execute the command shell instead, then pass the batch file or
shell script as a single command, using the <code>/c</code> or
<code>-c</code> switch, respectively. See
<a href="#shell-redirect-2">the above section</a>
for example <code><exec></code> tasks
executing <code>sh</code>. On Windows, use something like:</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
<exec dir="." executable="cmd.exe" os="Windows NT">
<arg line="/c test.bat"/>
</exec>
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
</blockquote>
</td></tr>
</table>
@@ -848,17 +933,18 @@ shell-prompt> cat < foo
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
I've made a <delete> task to delete unwanted
sourcesafe control files (CVS files, editor backup files), but
it doesn't seem to work. The files never get deleted. What's
I've used a <code><delete></code> task to delete
unwanted
SourceSafe control files (CVS files, editor backup files, etc.), but
it doesn't seem to work; the files never get deleted. What's
wrong?
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>This is probably happening because by default, Ant excludes
SourceSafe control files (<code>vssver.scc</code>) and other
<p>This is probably happening because, by default, Ant excludes
SourceSafe control files (<code>vssver.scc</code>) and certain other
files from FileSets.</p>
<p>Here's what you probably did:</p>
<div align="left">
@@ -884,7 +970,8 @@ shell-prompt> cat < foo
</tr>
</table>
</div>
<p>You need to switch off the default exclusions and it will work:</p>
<p>You need to switch off the default exclusions,
and it will work:</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -910,7 +997,7 @@ shell-prompt> cat < foo
</table>
</div>
<p>For a complete listing of the patterns that are excluded
by default, see <a href="manual/dirtasks.html">the user
by default, see <a href="manual/dirtasks.html#defaultexcludes ">the user
manual</a>.</p>
</blockquote>
</td></tr>
@@ -930,16 +1017,16 @@ shell-prompt> cat < foo
<blockquote>
<p>There are actually several answers to this question.</p>
<p>If you have only one set and one unset property to test,
you can put both an <code>if</code> and an <code>unless</code>
attribute into the target. The target will act as if they
you can specify both an <code>if</code> and an <code>unless</code>
attribute for the target, and they will act as if they
are "anded" together.</p>
<p>If you are using a version of Ant 1.3 or earlier, the
way to work with all other cases is to chain targets together
to determine the specific state you wish to test for.</p>
<p>To see how this works, assume you have three properties,
to determine the specific state you want to test for.</p>
<p>To see how this works, assume you have three properties:
<code>prop1</code>, <code>prop2</code>, and <code>prop3</code>.
You want to test that <code>prop1</code> and <code>prop2</code>
are set, but that <code>prop3</code> is not. If the condition
are set, and that <code>prop3</code> is not. If the condition
holds true you want to echo "yes".</p>
<p>Here is the implementation in Ant 1.3 and earlier:</p>
<div align="left">
@@ -975,9 +1062,13 @@ shell-prompt> cat < foo
</tr>
</table>
</div>
<p>Note that <code><antcall></code> tasks do not pass
<p>Note: <code><antcall></code> tasks do <em>not</em> pass
property changes back up to the environment they were called
from.</p>
from, so you would'nt be able to, for example, set a
<code>result</code> property in the <code>cond-if-3</code> target,
then do
<code><echo message="result is ${result}"/></code>
in the <code>cond</code> target.</p>
<p>Starting with Ant 1.4, you can use the
<code><condition></code> task.</p>
<div align="left">
@@ -1030,9 +1121,10 @@ shell-prompt> cat < foo
<li>To get a literal <code>$</code> in Ant, you have to
escape it with another <code>$</code> - this will also break
the special treatment of the sequence <code>${</code>.</li>
the special treatment of the <code>${</code> sequence .</li>
</ul>
<p>This is neither readable, nor easy to understand, therefore
<p>Because testing for a literal <code>${property}</code> string
isn't all that readable or easy to understand,
post-1.4.1 Ant introduces the <code><isset></code> element
to the <code><condition></code> task.</p>
<p>Here is the previous example done using
@@ -1070,10 +1162,13 @@ shell-prompt> cat < foo
</div>
<p>The last option is to use a scripting language to set the
properties. This can be particularly handy when you need much
better control than the simple conditions shown here, but of
course comes with the overhead of adding JAR files to support
finer control than the simple conditions shown here but, of
course, comes with the overhead of adding JAR files to support
the language, to say nothing of the added maintenance in requiring
two languages to implement a single system.</p>
two languages to implement a single system. See the
<a href="manual/OptionalTasks/script.html">
<code><script></code> task documentation</a> for more
details.</p>
</blockquote>
</td></tr>
</table>
@@ -1083,9 +1178,9 @@ shell-prompt> cat < foo
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
I have a target I want to skip if a variable is set,
so I have <code>unless="variable "</code> as an attribute
of the target. The trouble is that all of the targets that this target
I have a target I want to skip if a property is set,
so I have <code>unless="property "</code> as an attribute
of the target, but all the targets this target
depends on are still executed. Why?
</strong>
</font>
@@ -1093,18 +1188,19 @@ shell-prompt> cat < foo
<tr><td>
<blockquote>
<p>The list of dependencies is generated by Ant before any of the
targets are run. This allows dependent targets such as an
<code>init</code> target to set properties that can control the
execution of the targets higher in the dependency graph. This
is a good thing.</p>
<p>When your dependencies actually break down the higher level task
into several simpler steps, though, this behaviour becomes
counterintuitive. There are a couple of solutions available:
targets are run. This allows dependent targets, such as an
<code>init</code> target, to set properties that can control the
execution of the targets higher in the dependency graph. This
is a good thing.</p>
<p>However, when your dependencies break down the
higher-level task
into several smaller steps, this behaviour becomes
counter-intuitive. There are a couple of solutions available:
</p>
<ol>
<li>Put the same condition on each of the dependent targets.</li>
<li>Execute the steps using <code><antcall></code>
<li>Execute the steps using <code><antcall></code>,
instead of specifying them inside the <code>depends</code>
attribute.</li>
</ol>
@@ -1117,10 +1213,10 @@ shell-prompt> cat < foo
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
In my fileset, I've put in an
In my <code>< fileset></code> , I've put in an
<code><exclude></code> of all files followed by an
<code><include></code> of just the files I want, but it
isn't giving me anything at all. What's wrong?
isn't giving me any files at all. What's wrong?
</strong>
</font>
@@ -1128,8 +1224,8 @@ shell-prompt> cat < foo
<tr><td>
<blockquote>
<p>The order of the <code><include></code> and
<code><exclude></code> tags within a fileset is ignored
when the files et is created. Instead, all of the
<code><exclude></code> tags within a <code><fileset></code>
is ignored when the FileS et is created. Instead, all of the
<code><include></code> elements are processed together,
followed by all of the <code><exclude></code>
elements. This means that the <code><exclude></code>
@@ -1137,8 +1233,9 @@ shell-prompt> cat < foo
<code><include></code> elements.</p>
<p>To get the files you want, focus on just the
<code><include></code> patterns that would be necessary
to get them. If you need to trim the list that the includes
would produce, use excludes.</p>
to get them. If you find you need to trim the list that the
<code><include></code> elements
produce, then use <code><exclude></code> elements.</p>
</blockquote>
</td></tr>
</table>
@@ -1155,7 +1252,7 @@ shell-prompt> cat < foo
<tr><td>
<blockquote>
<p>See the <a href="external.html#IDE and Editor Integration">section
on IDE integration</a> on our external tool s page.</p>
on IDE integration</a> on our External Tools and Task s page.</p>
</blockquote>
</td></tr>
</table>
@@ -1166,18 +1263,18 @@ shell-prompt> cat < foo
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Why doesn't (X)Emacs/vi/MacOS X's project builder
parse the error messages generated by Ant correctly ?
correctly parse the error messages generated by Ant?
</strong>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Ant adds a "banner" with the name of the current
task in front of all messages - and there are no built-in
regular expressions in your E ditor that would account for
task in front of all logging messages - and there are no built-in
regular expressions in your e ditor that would account for
this.</p>
<p>You can disable this banner by invoking Ant with the
<code>-emacs</code> switch. Alternatively you can add the
<code>-emacs</code> switch. Alternatively, you can add the
following snippet to your <code>.emacs</code> to make Emacs
understand Ant's output.</p>
<div align="left">
@@ -1285,9 +1382,9 @@ while(<STDIN>) {
happen quite frequently - if your version of Ant contains
the optional <code><test></code> and
<code><junit></code> tasks, there are two XML
elements named test (the task and the nested child element
of <code><junit></code>) with different attribute
lists. This problem cannot be solved, DTDs don't give a
elements named <code> test</code> (the task and the nested child
element of <code><junit></code>) with different attribute
lists. This problem cannot be solved; DTDs don't give a
syntax rich enough to support this.</li>
</ul>
</blockquote>
@@ -1386,8 +1483,8 @@ while(<STDIN>) {
</td></tr>
<tr><td>
<blockquote>
<p>If you are using a nightly- build of Ant 1.5 after
2001-12-14, you can use the built-in MailLogger. </p>
<p>If you are using a nightly build of Ant 1.5 after
2001-12-14, you can use the built-in MailLogger: </p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -1409,15 +1506,15 @@ while(<STDIN>) {
</tr>
</table>
</div>
<p>See the <a href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/manual/listeners.html?content-type=text/html">Listener
& Logger documentation</a> for details on the properties
<p>See the <a href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-ant/docs/manual/listeners.html?content-type=text/html">Listeners
& Loggers</a> documentation for details on the properties
required.</p>
<p>For older versions of Ant you can use a custom
BuildListener, that sends out an email
<p>For older versions of Ant, 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 <a href="http://java.sun.com/products/javamail/">JavaMail</a>,
the source is </p>
on <a href="http://java.sun.com/products/javamail/">JavaMail</a>.
The source is: </p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -1547,7 +1644,7 @@ public class BuildMonitor implements BuildListener {
</tr>
</table>
</div>
<p>With a <code>monitor.properties</code> like this</p>
<p>With a <code>monitor.properties</code> like this: </p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -1585,7 +1682,7 @@ build.succeeded.email.subject=Nightly build succeeded!
</div>
<p><code>monitor.properties</code> should be placed right next
to your compiled <code>BuildMonitor.class</code>. To use it,
invoke Ant like</p>
invoke Ant like: </p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -1610,7 +1707,7 @@ ant -listener BuildMonitor -logfile build.log
<p>Make sure that <code>mail.jar</code> from JavaMail and
<code>activation.jar</code> from the
<a href="http://java.sun.com/products/javabeans/glasgow/jaf.html">Java
Beans Activation Framework</a> in your <code>CLASSPATH</code>.</p>
Beans Activation Framework</a> are in your <code>CLASSPATH</code>.</p>
</blockquote>
</td></tr>
</table>
@@ -1657,8 +1754,7 @@ public void buildFinished(BuildEvent e) {
</div>
<p>This is more accurate than just reading the same property
files that your project does, since it will give the correct
results for properties that are specified on the command line
when running Ant.</p>
results for properties that were specified on the Ant command line.</p>
</blockquote>
</td></tr>
</table>
@@ -1668,7 +1764,7 @@ public void buildFinished(BuildEvent e) {
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
<chmod> or <exec> don't work in Ant
<chmod> or <exec> does n't work in Ant
1.3 on Unix
</strong>
</font>
@@ -1676,9 +1772,10 @@ public void buildFinished(BuildEvent e) {
<tr><td>
<blockquote>
<p>The <code>antRun</code> script in <code>ANT_HOME/bin</code>
has DOS instead of Unix line endings, you must remove the
carriage return characters from this file. This can be done by
using Ant's <fixcrlf> task or something like:</p>
has DOS instead of Unix line endings; you must remove the
carriage-return characters from this file. This can be done by
using Ant's <code><fixcrlf></code> task
or something like:</p>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
@@ -1717,8 +1814,8 @@ mv /tmp/foo $ANT_HOME/bin/antRun
<tr><td>
<blockquote>
<p>There is a bug in the Solaris reference implementation of
the JDK, see <a href="http://developer.java.sun.com/developer/bugParade/bugs/4230399.html">http://developer.java.sun.com/developer/bugParade/bugs/4230399.html</a>.
This also appears to be true under Linux, m oving the JDK to
the JDK ( see <a href="http://developer.java.sun.com/developer/bugParade/bugs/4230399.html">http://developer.java.sun.com/developer/bugParade/bugs/4230399.html</a>) .
This also appears to be true under Linux. M oving the JDK to
the front of the PATH fixes the problem.</p>
</blockquote>
</td></tr>