Apache Ant - Frequently Asked Questions
Projects
Apache Ant
Welcome
License
News
Security Reports
Documentation
Manual
Related Projects
External Tools and Tasks
Resources
Frequently Asked Questions
Wiki
Having Problems?
Binary Distributions
Source Distributions
Ant Manual
Contributing
Mailing Lists
Git Repositories
Subversion Repositories
Nightly+Continuous Builds
Bug Database
Security
Sponsorship
Thanks
Sponsorship
Project Management
Contributors
Apache Ant Mission
Project Bylaws
Legal
Processes
Archive
Frequently Asked Questions
Questions
About this FAQ
Where do I find the latest version of this
document?
How can I contribute to this FAQ?
How do you create the HTML version of this
FAQ?
General
What is Apache Ant?
Why do you call it Ant?
Tell us a little bit about Ant's history.
Installation
Which version of Java is required to run
Apache Ant?
I get checksum errors when I try to extract the
tar.gz
distribution file. Why?
How do you get ant-1.6.x (or any version later than
1.5.2) to work on on RedHat ES 3?
How do I ...
How to I precompile Java Server Pages (JSPs)?
How do I realize os--specific configurations?
How do I add an external task that I've written to the
page "External Tools and Tasks"?
How do I create new tasks?
How do I pass parameters from the command line to my
build file?
How can I use Jikes-specific command-line
switches?
How do I include a < character in my command-line arguments?
How do I redirect standard input or standard output
in the
task?
How do I execute a batch file or shell script from Ant?
I want to execute a particular target only if
multiple conditions are true.
How can I include national characters like German
umlauts in my build file?
How do I use
jar
's
switch?
I don't want a MANIFEST.
How can I do something like
(double expanding the property)?
How can I delete everything beneath a particular directory,
preserving the directory itself?
How can I delete a particular directory,
if and only if it is empty?
It doesn't work (as expected)
General Advice
Why does Ant always recompile all my Java files?
I've used a
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?
I have a target I want to skip if a property is set,
so I have
unless="property"
as an attribute
of the target, but all the targets this target
depends on are still executed. Why?
In my
, I've put in an
of all files followed by an
of just the files I want, but it
isn't giving me any files at all. What's wrong?
ant
failed to build my program via javac
even when I put the needed jars in an external
build.properties
file and reference them by
pathelement
or
classpath refid
Ant creates WAR files with a lower-case
web-inf
or JAR files with a lower-case
meta-inf
directory.
I installed Ant 1.6.x and now get
Exception in thread "main" java.lang.NoClassDefFoundError:
I installed Ant 1.6.x and now get
java.lang.InstantiationException: org.apache.tools.ant.Main
Whenever I use the Ant jar or manifest related tasks, long lines in
my manifest are wrapped at 70 characters and the resulting jar does
not work in my application server. Why does Ant do this?
fails with
"Cannot run
program "...":CreateProcess error=2"
on
Windows.
My
reports are missing the first line
containing the failure message.
Properties are expanded twice in
my
macrodef
ed tasks.
Apache Ant and IDEs/Editors
Is Apache Ant supported by my IDE/Editor?
Why doesn't (X)Emacs/vi/MacOS X's project builder
correctly parse the error messages generated by Ant?
Advanced Issues
Is there a DTD that I can use to validate my build
files?
How do I include an XML snippet in my build file?
How do I send an email with the result of my build
process?
How do I get at the properties that Ant was running
with from inside BuildListener?
Known Problems
causes other tasks to hang
or leads to strange behaviour of
tasks.
causes a
StackOverflowError
Ant 1.7.0 doesn't build from sources without
JUnit
1.3 on Unix
US