ANT Section Index | Page 3
I'm searching for a task which compares two binary files
diff of binary files
I'm searching for a task which compares two binary files
How do I adjust line endings for Unix and Windows systems?
Look into <fixcrlf> task.
How do I measure the time it taks for the task "java" to complete?
How do I measure the time it taks for the task "java" to
complete?
How are special characters escaped in Ant build files?
Use XML character entity references to escape.
character
reference
<
<
>
>
"
"
&
&
...more
Using junit inside ant, I would like to exclude inner classes. Right now I have junit running all classes like **/*Test*, but when I make an anonymous inner class in the Test case it makes a new *.class file like MyTest$1.class in addition to the MyTest.class, and then junit tries to execute the inner class.
Escaping the dollar sign
Using junit inside ant, I would like to exclude inner classes. Right now I have junit running all classes like **/*Test*, but when I make an anonymous inner class in the ...more
How do I get <javac> to list each file that it is compiling?
I have now written my own ant logger class to filter out all verbose messages except for the "File(s) to be compiled" message, which lists them all. Here is my code; if anyone wants to use it, fe...more
Where can I get the information for tasks like 'path', 'classpath' etc?
Path, Fileset, Patternset, and others like Mapper are all datatypes, not tasks. They are briefly documented from the Ant Manual under the "Built-in Tasks" section (see the top of the menu there)....more
Why do I get "[property] Override ignored for <insert prop name>" in my verbose output?
Properties are immutable. Once set, barring a few exceptions, a property cannot change value. It is perfectly legitimate practice to attempt to set properties that may have already been set, all...more
How can I delete files depending on their age?
Unfortunately at the moment you can't implement this without resorting to using <exec> to a command-line script or some other roundabout way. It appears that in Ant 1.5 that filesets will a...more
How can I test for JVM versions?
If you're using Ant 1.4.1 or greater, the <condition> task works great. Here's an example that ought to give you what you need:
<project basedir="." default="test">
<target nam...more
How do I get the hostname in a cross-platform way?
Ant has a mechanism for gathering environment variables. Unfortunately the hostname environment variable is different on Windows versus Unix boxes, but Ant's property immutability helps us out:
...more
How do I version a product of a build?
There is no single answer, but here are some thoughts:
Use <propertyfile> and a properties file to keep an incrementing value
Use the appropriate source code management tasks (i.e. <...more
How do I fix the "out of environment space" errors when running Ant on Win9x/ME?
Add the following line to your config.sys file.
SHELL=c:windowscommand.com c:windows /P /E:nnnn
Where nnnn is the number of kilobytes of environment space to be created. 4096 has been mentioned ...more
How to delete content of directory without deleting the directory itself?
<delete includeEmptyDirs="true">
<fileset dir="dir_name" includes="**/*" defaultexcludes="no"/>
</delete>
How do I include different web.xml files in order to switch between production and development builds?
Several ways to do this kind of thing, but the simplest is to put your two different web.xml files into different directories named 'production' and 'development' (or alternatively name your files...more