@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<html lang="en" >
<!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -11,15 +11,10 @@
<meta name="email" content="bodewig@apache.org">
</head>
<body text="#000000" bgcolor="#ffffff">
<table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap" valign="middle" bgcolor="#CFDCED" height="20"><img height="1" width="5" alt="" border="0" src="./images/spacer.gif"><font size="2" face="Arial, Helvetica, Sans-serif"><script src="./breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td>
</tr>
<tr>
<td bgcolor="#4C6C8F" height="2"><img height="2" width="2" alt="" border="0" src="./images/spacer.gif"></td>
</tr>
</table>
<body>
<p class="navpath">
<script src="./breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
</p>
<table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -74,6 +69,7 @@
<td bgcolor="#4C6C8F" colspan="4"><img width="1" height="10" alt="" src="./images/spacer.gif"></td>
</tr>
</table>
<table summary="page content" bgcolor="#ffffff" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
@@ -213,14 +209,7 @@
</font>
</td></tr>
</table>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>About this FAQ</strong>
</font>
</td></tr>
</table>
<h4 class="toc">About this FAQ</h4>
<ul>
<li><a href="#latest-version">
Where do I find the latest version of this
@@ -234,14 +223,7 @@
FAQ?
</a></li>
</ul>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>General</strong>
</font>
</td></tr>
</table>
<h4 class="toc">General</h4>
<ul>
<li><a href="#what-is-ant">
What is Apache Ant?
@@ -253,28 +235,14 @@
Tell us a little bit about Ant's history.
</a></li>
</ul>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>Installation</strong>
</font>
</td></tr>
</table>
<h4 class="toc">Installation</h4>
<ul>
<li><a href="#no-gnu-tar">
I get checksum errors when I try to extract the
<code>tar.gz</code> distribution file. Why?
</a></li>
</ul>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>How do I ...</strong>
</font>
</td></tr>
</table>
<h4 class="toc">How do I ...</h4>
<ul>
<li><a href="#adding-external-tasks">
How do I add an external task that I've written to the
@@ -307,14 +275,7 @@
umlauts in my build file?
</a></li>
</ul>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>It doesn't work (as expected)</strong>
</font>
</td></tr>
</table>
<h4 class="toc">It doesn't work (as expected)</h4>
<ul>
<li><a href="#always-recompiles">
Why does Ant always recompile all my Java files?
@@ -350,14 +311,7 @@
<code>meta-inf</code> directory.
</a></li>
</ul>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>Ant and IDEs/Editors</strong>
</font>
</td></tr>
</table>
<h4 class="toc">Ant and IDEs/Editors</h4>
<ul>
<li><a href="#integration">
Is Ant supported by my IDE/Editor?
@@ -367,14 +321,7 @@
correctly parse the error messages generated by Ant?
</a></li>
</ul>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>Advanced Issues</strong>
</font>
</td></tr>
</table>
<h4 class="toc">Advanced Issues</h4>
<ul>
<li><a href="#dtd">
Is there a DTD that I can use to validate my build
@@ -392,14 +339,7 @@
with from inside BuildListener?
</a></li>
</ul>
<br/>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>Known Problems</strong>
</font>
</td></tr>
</table>
<h4 class="toc">Known Problems</h4>
<ul>
<li><a href="#remove-cr">
<chmod> or <exec> doesn't work in Ant
@@ -432,31 +372,17 @@
</font>
</td></tr>
</table>
<br/ >
<p class="faq" >
<a name="latest-version"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Where do I find the latest version of this
Where do I find the latest version of this
document?
</strong>
</font>
</td></tr>
</table>
</p>
<p>The latest version can always be found at Ant's homepage
<a href="http://ant.apache.org/faq.html">http://ant.apache.org/faq.html</a>.</p>
<br/ >
<p class="faq">
<a name="adding-faqs"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How can I contribute to this FAQ?
</strong>
</font>
</td></tr>
</table>
How can I contribute to this FAQ?
</p>
<p>The page you are looking it is generated from
<a href="http://cvs.apache.org/viewcvs.cgi/~checkout~/ant/xdocs/faq.xml">this</a>
document. If you want to add a new question, please submit
@@ -465,18 +391,11 @@
<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>
<br/ >
<p class="faq" >
<a name="creating-faq"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do you create the HTML version of this
How do you create the HTML version of this
FAQ?
</strong>
</font>
</td></tr>
</table>
</p>
<p>We use
<a href="http://jakarta.apache.org/velocity/anakia.html">Anakia</a>
to render the HTML version from the original XML file.</p>
@@ -490,31 +409,17 @@
if you follow the instruction from Anakia's homepage, you
should get it to work without that. Just make sure all
required jars are in the task's classpath.</p>
<br/ >
<p class="faq" >
<a name="what-is-ant"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
What is Apache Ant?
</strong>
</font>
</td></tr>
</table>
What is Apache Ant?
</p>
<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>
<br/ >
<p class="faq">
<a name="ant-name"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Why do you call it Ant?
</strong>
</font>
</td></tr>
</table>
Why do you call it Ant?
</p>
<p>According to Ant's original author, James Duncan
Davidson, the name is an acronym for "Another Neat
Tool".</p>
@@ -523,17 +428,10 @@
"ants are very small and can carry a weight dozens of times
their own" - describing what Ant is intended to
be.</p>
<br/ >
<p class="faq" >
<a name="history"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Tell us a little bit about Ant's history.
</strong>
</font>
</td></tr>
</table>
Tell us a little bit about Ant's history.
</p>
<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
@@ -646,18 +544,11 @@
</td>
</tr>
</table>
<br/ >
<p class="faq" >
<a name="no-gnu-tar"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
I get checksum errors when I try to extract the
I get checksum errors when I try to extract the
<code>tar.gz</code> distribution file. Why?
</strong>
</font>
</td></tr>
</table>
</p>
<p>Ant's distribution contains file names that are longer
than 100 characters, which is not supported by the standard
tar file format. Several different implementations of tar use
@@ -672,18 +563,11 @@
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>
<br/ >
<p class="faq" >
<a name="adding-external-tasks"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I add an external task that I've written to the
How do I add an external task that I've written to the
page "External Tools and Task"?
</strong>
</font>
</td></tr>
</table>
</p>
<p>Join and post a message to the dev or user mailing
list (one list is enough), including the following
information:</p>
@@ -704,36 +588,22 @@
</ul>
<p>The preferred format for this information is a patch to <a href="http://cvs.apache.org/viewcvs.cgi/~checkout~/ant/xdocs/external.xml">this</a>
document.</p>
<br/ >
<p class="faq" >
<a name="passing-cli-args"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I pass parameters from the command line to my
How do I pass parameters from the command line to my
build file?
</strong>
</font>
</td></tr>
</table>
</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>
<br/ >
<p class="faq" >
<a name="jikes-switches"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<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>
</table>
</p>
<p>A couple of switches are supported via "magic"
properties:</p>
<table class="ForrestTable" cellspacing="1" cellpadding="4">
@@ -814,33 +684,19 @@
<p>With Ant >= 1.5, you can also use nested
<code><compilerarg></code> elements with the
<code><javac></code> task.</p>
<br/ >
<p class="faq" >
<a name="shell-redirect-1"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I include a < character in my command-line arguments?
</strong>
</font>
</td></tr>
</table>
How do I include a < character in my command-line arguments?
</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>
<br/ >
<p class="faq">
<a name="shell-redirect-2"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I redirect standard input or standard output
How do I redirect standard input or standard output
in the <code><exec></code> task?
</strong>
</font>
</td></tr>
</table>
</p>
<p>Say you want to redirect the standard input stream of the
<code>cat</code> command to read from a file, something
like:</p>
@@ -873,17 +729,10 @@ shell-prompt> cat < foo
</exec>
</pre>
<p>Note the double-quotes nested inside the single-quotes.</p>
<br/ >
<p class="faq" >
<a name="batch-shell-execute"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I execute a batch file or shell script from Ant?
</strong>
</font>
</td></tr>
</table>
How do I execute a batch file or shell script from Ant?
</p>
<p>On native Unix systems, you should be able to run shell scripts
directly. On systems running a Unix-type shell (for example, Cygwin
on Windows) execute the (command) shell instead - <code>cmd</code>
@@ -899,18 +748,11 @@ shell-prompt> cat < foo
<arg line="/c test.bat"/>
</exec>
</pre>
<br/ >
<p class="faq" >
<a name="multi-conditions"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
I want to execute a particular target only if
I want to execute a particular target only if
multiple conditions are true.
</strong>
</font>
</td></tr>
</table>
</p>
<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 specify both an <code>if</code> and an <code>unless</code>
@@ -1011,18 +853,11 @@ shell-prompt> cat < foo
<a href="manual/OptionalTasks/script.html">
<code><script></code> task documentation</a> for more
details.</p>
<br/ >
<p class="faq" >
<a name="encoding"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How can I include national characters like German
How can I include national characters like German
umlauts in my build file?
</strong>
</font>
</td></tr>
</table>
</p>
<p>You need to tell the XML parser which character encoding
your build file uses, this is done inside the <a href="http://www.w3.org/TR/2000/REC-xml-20001006#sec-prolog-dtd">XML
declaration</a>.</p>
@@ -1034,17 +869,10 @@ shell-prompt> cat < foo
<pre class="code">
<?xml version="1.0" encoding="ISO-8859-1" ?>
</pre>
<br/ >
<p class="faq" >
<a name="always-recompiles"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Why does Ant always recompile all my Java files?
</strong>
</font>
</td></tr>
</table>
Why does Ant always recompile all my Java files?
</p>
<p>In order to find out which files should be compiled, Ant
compares the timestamps of the source files to those of the
resulting <code>.class</code> files. Opening all source files
@@ -1069,20 +897,13 @@ shell-prompt> cat < foo
the actual directory the source
files live in and the directory the class files should go into,
respectively.</p>
<br/ >
<p class="faq" >
<a name="defaultexcludes"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
I've used a <code><delete></code> task to
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>
</table>
</p>
<p>This is probably happening because, by default, Ant excludes
SourceSafe control files (<code>vssver.scc</code>) and certain other
files from FileSets.</p>
@@ -1103,20 +924,13 @@ shell-prompt> cat < foo
<p>For a complete listing of the patterns that are excluded
by default, see <a href="manual/dirtasks.html#defaultexcludes">the user
manual</a>.</p>
<br/ >
<p class="faq" >
<a name="stop-dependency"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
I have a target I want to skip if a property is set,
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>
</td></tr>
</table>
</p>
<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
@@ -1134,21 +948,14 @@ shell-prompt> cat < foo
instead of specifying them inside the <code>depends</code>
attribute.</li>
</ol>
<br/ >
<p class="faq" >
<a name="include-order"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
In my <code><fileset></code>, 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 any files at all. What's wrong?
</strong>
</font>
</td></tr>
</table>
</p>
<p>The order of the <code><include></code> and
<code><exclude></code> tags within a <code><fileset></code>
is ignored when the FileSet is created. Instead, all of the
@@ -1162,20 +969,13 @@ shell-prompt> cat < foo
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>
<br/ >
<p class="faq" >
<a name="properties-not-trimmed"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
<code>ant</code> failed to build my program via javac
<code>ant</code> failed to build my program via javac
even when I put the needed jars in an external
<code>build.properties</code> file and reference them by
<code>pathelement</code> or <code>classpath refid</code>.
</strong>
</font>
</td></tr>
</table>
</p>
<p>When <code>ant</code> loads properties from an external
file it dosn't touch the value of properties, trailing blanks
will not be trimmed for example.</p>
@@ -1183,19 +983,12 @@ shell-prompt> cat < foo
compile, the task which requires the value, javac for example
would fail to compile since it can't find the file due to
trailing spaces.</p>
<br/ >
<p class="faq" >
<a name="winzip-lies"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Ant creates WAR files with a lower-case
Ant creates WAR files with a lower-case
<code>web-inf</code> or JAR files with a lower-case
<code>meta-inf</code> directory.
</strong>
</font>
</td></tr>
</table>
</p>
<p>No it doesn't.</p>
<p>You may have seen these lower-case directory names in
WinZIP, but WinZIP is trying to be helpful (and fails). If
@@ -1204,31 +997,17 @@ shell-prompt> cat < foo
all lower-case for you.</p>
<p>If you extract (or just check) the archive with jar, you
will see that the names have the correct case.</p>
<br/ >
<p class="faq" >
<a name="integration"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Is Ant supported by my IDE/Editor?
</strong>
</font>
</td></tr>
</table>
Is Ant supported by my IDE/Editor?
</p>
<p>See the <a href="external.html#IDE and Editor Integration">section
on IDE integration</a> on our External Tools and Tasks page.</p>
<br/ >
<p class="faq">
<a name="emacs-mode"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Why doesn't (X)Emacs/vi/MacOS X's project builder
Why doesn't (X)Emacs/vi/MacOS X's project builder
correctly parse the error messages generated by Ant?
</strong>
</font>
</td></tr>
</table>
</p>
<p>Ant adds a "banner" with the name of the current
task in front of all logging messages - and there are no built-in
regular expressions in your editor that would account for
@@ -1281,18 +1060,11 @@ while(<STDIN>) {
print;
};
</pre>
<br/ >
<p class="faq" >
<a name="dtd"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
Is there a DTD that I can use to validate my build
Is there a DTD that I can use to validate my build
files?
</strong>
</font>
</td></tr>
</table>
</p>
<p>An incomplete DTD can be created by the
<code><antstructure></code> task - but this one
has a few problems:</p>
@@ -1317,17 +1089,10 @@ while(<STDIN>) {
lists. This problem cannot be solved; DTDs don't give a
syntax rich enough to support this.</li>
</ul>
<br/ >
<p class="faq" >
<a name="xml-entity-include"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I include an XML snippet in my build file?
</strong>
</font>
</td></tr>
</table>
How do I include an XML snippet in my build file?
</p>
<p>You can use XML's way of including external files and let
the parser do the job for Ant:</p>
<pre class="code">
@@ -1357,18 +1122,11 @@ while(<STDIN>) {
<!ENTITY include SYSTEM "file:./header.xml">
]>
</pre>
<br/ >
<p class="faq" >
<a name="mail-logger"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I send an email with the result of my build
How do I send an email with the result of my build
process?
</strong>
</font>
</td></tr>
</table>
</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>
<pre class="code">
@@ -1522,18 +1280,11 @@ ant -listener BuildMonitor -logfile build.log
<code>activation.jar</code> from the
<a href="http://java.sun.com/products/javabeans/glasgow/jaf.html">Java
Beans Activation Framework</a> are in your <code>CLASSPATH</code>.</p>
<br/ >
<p class="faq" >
<a name="listener-properties"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
How do I get at the properties that Ant was running
How do I get at the properties that Ant was running
with from inside BuildListener?
</strong>
</font>
</td></tr>
</table>
</p>
<p>You can get at a hashtable with all the properties that Ant
has been using through the BuildEvent parameter. For
example:</p>
@@ -1547,18 +1298,11 @@ public void buildFinished(BuildEvent e) {
<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 were specified on the Ant command line.</p>
<br/ >
<p class="faq" >
<a name="remove-cr"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
<chmod> or <exec> doesn't work in Ant
<chmod> or <exec> doesn't work in Ant
1.3 on Unix
</strong>
</font>
</td></tr>
</table>
</p>
<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
@@ -1568,33 +1312,19 @@ public void buildFinished(BuildEvent e) {
tr -d '\r' < $ANT_HOME/bin/antRun > /tmp/foo
mv /tmp/foo $ANT_HOME/bin/antRun
</pre>
<br/ >
<p class="faq" >
<a name="javadoc-cannot-execute"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
JavaDoc failed: java.io.IOException: javadoc: cannot execute
</strong>
</font>
</td></tr>
</table>
JavaDoc failed: java.io.IOException: javadoc: cannot execute
</p>
<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. Moving the JDK to
the front of the PATH fixes the problem.</p>
<br/ >
<p class="faq">
<a name="delegating-classloader"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
<style> or <junit> ignores my
<style> or <junit> ignores my
<classpath>
</strong>
</font>
</td></tr>
</table>
</p>
<p>These tasks don't ignore your classpath setting, you
are facing a common problem with delegating classloaders.</p>
<p>First of all let's state that Ant adds all
@@ -1686,20 +1416,13 @@ mv /tmp/foo $ANT_HOME/bin/antRun
for <code><junit></code>, you still have to use a
<code><taskdef></code> with a nested
<code><classpath></code> to define the junit task.</p>
<br/ >
<p class="faq" >
<a name="winxp-jdk14-ant14"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
When running Ant 1.4 on Windows XP and JDK 1.4, I get
When running Ant 1.4 on Windows XP and JDK 1.4, I get
various errors when trying to <code><exec></code>, fork
<code><java></code> or access environment
variables.
</strong>
</font>
</td></tr>
</table>
</p>
<p>Ant < 1.5 doesn't recognize Windows XP as a flavor
of Windows that runs <code>CMD.EXE</code> instead of
<code>COMMAND.COM</code>. JDK 1.3 will tell Ant that Windows
@@ -1709,19 +1432,12 @@ mv /tmp/foo $ANT_HOME/bin/antRun
environment variable <code>ANT_OPTS</code> to
<code>-Dos.name=Windows_NT</code> prior to invoking Ant has
been confirmed as a workaround.</p>
<br/ >
<p class="faq" >
<a name="1.5-cygwin-sh"></a>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#4C6C8F">
<font color="#ffffff" face="arial,helvetica,sanserif">
<strong>
The <code>ant</code> wrapper script of Ant 1.5 fails
The <code>ant</code> wrapper script of Ant 1.5 fails
for Cygwin if <code>ANT_HOME</code> is set to a Windows style
path.
</strong>
</font>
</td></tr>
</table>
</p>
<p>This problem has been reported only hours after Ant 1.5 has
been released, see <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=10664">Bug
10664</a> and all it's duplicates.</p>