Ant 1.4 Source Distribution
This is release 1.4 of Ant.
The tar files in the distribution use GNU tar extensions
and must be untarred with a GNU compatible version of tar. The version
of tar on Solaris and Mac OS X will not work with these files
To build ant from the source distribution, please refer to the documentation
and use the bootstrap & build scripts provided in the source distribution.
The changes from Release 1.3 to this release are detailed below. This
information is included in the distributions in the file WHATSNEW
Thank you for using Ant.
The Apache Jakarta Project
Many of the distribution kits have been digitally signed (using
PGP). If so, there will be an accompanying
distribution.asc file in the same directory as
the distribution. The PGP keys can be found in the distribution
directory at <http://www.apache.org/dist/ant/KEYS>.
Always test available signatures, e.g.,
> pgpk -a KEYS
> pgpv jakarta-ant-bin-1.3.tar.gz.asc
> pgp -ka KEYS
> pgp jakarta-ant-bin-1.3.tar.gz.asc
> gpg --import KEYS
> gpg --verify jakarta-ant-bin-1.3.tar.gz.asc
Changes from Ant 1.3 to Ant 1.4
Changes that could break older environments:
- JUnitReport now uses the xalan redirect extension for multi-output.
With Xalan 1.2.2 it forces the use of bsf.jar in the classpath.
(Available in the xalan distribution). It is recommended to switch
to Xalan 2.x that do not need it.
- Zip.setWhenempty() has changed its signature.
- <rmic> is now implemented using a factory. This makes extending
rmic to use a new compiler a lot easier but may break custom
versions of this task that rely on the old implementation.
- several Zip methods have changed their signature as we now use a Zip
package of our own that handles Unix permissions for directories.
Furthermore <zip> will now use the platform's default character
encoding for filenames - this is consistent with the command line
ZIP tools, but causes problems if you try to open them from within
Java and your filenames contain non US-ASCII characters. Use the new
encoding attribute of the task and set it to UTF8 to get the old
- The <pvcs> task has been moved to a package of its own.
- JUnitResultFormater has two additional methods that must be
implemented by custom formatters.
- Ant will no longer use the canonical version of a path internally -
this may yield different results on filesystems that support
- The output generated by the xml formatter for <junit> has changed
again, it doesn't format the numeric value in the time attribute anymore.
- Pattern matching rules have changes slightly, the pattern foo*
doesn't match files contained in a directory named foo - use foo/*
- <fixcrlf> will not remove trailing whitespace at the end of lines anymore.
- The Classloader usage has been changed for the taskdef, property, available
and sql tasks so that it delegates to the parent classloader. This may cause
ClassNotFoundExceptions to be thrown if a system class attempts to load a
class in the taskdef's classpath (typically factory objects).
- Ant now allows multithreading of tasks and the containment of tasks within
other tasks. This can break customer listeners which do not expect messages
from a task before the previous task has finished.
- Ant now installs its own ouput stream into System.out to route output to the
task currently executing on the current thread. This also means that all
output is now routed as Ant message events. Customer listeners and loggers
should not call System.out at any time. This has always been true but such
usage now will cause problems due to possible recursion.
- Invalid manifest files will now cause build failures in the <jar> task.
- Ant Introspection now looks for methods with method names starting with
addConfigured. When called these methods are passed an argument after it has
been configured from the build file. Custom tasks supporting nested elements
starting with the name configured will no longer function.
- The environment variable JAVACMD that can be used to specify the
java executable to Ant's wrapper scripts must not contain additional
command line parameters any longer - please use the environment
variable ANT_OPTS for such parameters now.
- Ant's wrapper scripts now quote the CLASSPATH environment variable, thus
supporting classpaths which refer to directories containing spaces. This means
that the CLASSPATH environment variable cannot have quotes. Any quotes should
be removed. This will not affect the operation of the CLASSPATH environment
variable in other contexts.
- A delete task like
<fileset dir="somedir" />
will now remove "somedir" as well, unless there are still files left
in it (matched by the default excludes).
- The copy task will now fail if the file to be copied is not found.
- Ant properties defined in properties files now behave the same way as
properties defined in the build file. In particular the $ character needs
to be escaped in property values by doubling it to $$. So, to define a
property with the value $hello, you need to define it in a properties file
This was not the case in Ant 1.3
- New tasks: ear, p4counter, record, cvspass, vsscheckin, vsscheckout,
typedef, sleep, mimemail, set of tasks for Continuus/Synergy, dependset,
condition, maudit, mmetrics, jpcoverage, jpcovreport, jpcovmerge
- Ant now uses JAXP 1.1
- rmic now supports Kaffe's and Weblogic's version of rmic.
- new magic property build.rmic to chose the rmic implementation
- <tar> will now add empty directories as well
- you can now specify a description for <p4change>
- <touch> can now work on <fileset>s
- <uptodate> now supports a value attribute
- <fail> supports nested text
- <fixcrlf> won't override files that are already in the correct
- <sql> now supports REM comments as well as // and --
- <jar> now has a nested <metainf> element following the same idea as
- <pvcs> can now handle multiple projects.
- <available> now has a "type" attribute you can use in conjunction
with the "file" attribute to specify whether the "file" you're
looking for is a file or a directory.
- New <junit> formatter named "brief"
- <ejbjar> changes
- Add support for Borland Application Server to the <ejbjar> task using
a <borland> nested element.
- Add support for iPlanet Application Server to the <ejbjar> task. Also
includes some iPlanet utility tasks
- Add support for JBoss Application Server to the <ejbjar> task.
- Add a naming attribute to control the naming scheme that
ejbjar uses to name the generated EJB jars.
- Weblogic element now sets the compiler class for EJB 2.0 beans
- <dtd> elements can be specified at the <ejbjar> level for building generic
- <dtd> elements can now be URLs
- Allow the manifest to be specified for the generated jars
- The weblogic element now supprts an attribute noEJBC to skip the processing
of the jar by ejbc. The ejbc step will then occur at deployment
- weblogic will tell ejbc to use Jikes compiler if build.compiler is set to
jikes. It can be restored to the default, javac, operation if desired.
- Allow the <sql> Delimiter to be set in the so that Oracle stored procs may be
- <execon> and <apply> can now optionally skip empty filesets.
- <javadoc> has a new useexternalfile attribute that makes it use a
temporary file for sourcefile and package names - helps to defeat
command line length limitations.
- Data types like <path> can now be defined inside of <target>s
- you can now specify a classpath for <style> - the XSLT processor
will be loaded from this path
- added a force attribute to <style> to support dependencies that the
task cannot determine itself (dependency on parameters, not file
modification times for example)
- added vmlauncher attribute to exec tasks. This defaults to true. If
it is set to false, the VM's ability to launch commands in bypassed
and the OS shell, either directly or through the auxiliary antRun
scripts is used.
- regexp mapper now supports the java.util.regex package of JDK 1.4.
- New filesonly attribute for <zip> and friends to suppress directory
- New update attribute for <zip> and friends - update an existing
archive instead of creating a new one.
- <apply> and <execon> have been merged into a single task.
- added vssver.scc to the default excludes
- <available> has a new filepath attribute/nested element that allows
you top search for a file in a given path.
- <junit> can now optionally set a property on test failure.
- <taskdef> can now define several tasks at once, reading the
name/classname pairs from a property file or resource.
- <unzip/unjar/unwar> and <untar> now have an overwrite attribute that
defaults to true. If set to false, files that are newer than the
files in the archive will not be replaced.
- <patternset> and <fileset> now support nested <in/excludesfile>
elements - using these you can have more than one in/excludes file
- Three new supported compilers for javac: kjc for kopi, gcj for the
gcc frontend and sj for Symantec's compiler.
In addition extJavac or the new fork attribute can be
used to run the JDK's javac in a JVM separate from Ant.
- <fixrlf> can now with CR only line-ends and can use an arbitrary
between 2 and 80.
- The .NET tasks have been adapted to the beta2 release of the framework.
- <move> will now try to rename() files before copying them byte by
byte - only if filtering is of, of course.
- <ant> and <antcall> tasks now support a new attribute inheritAll. When set to
false, only user properties are passed through to the target Ant instance.
This includes properties set on the command line and properties explicitly
- <javadoc> now skips off line links if the package list cannot be found.
- <wlrun> now allows the security policy file to exist outside the weblogic
- <java> task will set the Thread contextClassLoader under JDKs 1.2+ to the
classloader for the class being executed.
- Introduce the concept of a TaskContainer - a task or element which can contain
- Add new tasks implementing the TaskContainer interface <parallel> and
<sequential> which allow parallel execution of tasks to be specified.
- <depend> task will now take into account dependencies on jar files and class
files from a given classpath.
- <jar> manifest entries may now be specified in the build file either
completely or to be merged with a manifest file.
- <tstamp> task custom formats now support locales.
- Added a listner which will forward events to Log4J. The log4j configuration
file should be in the directory from which Ant is run or passed as a system
property using a JVM argument.
- Introduced the concept of <filtersets> to allow for more control in which
filters get applied in a <copy> or <move> operation.
- Added nowarn attribute to javac and deprecated the Jikes-magic property
- The <depend> task cache format has changed and all dependency information is
now * stored in a single file.
- Testcases have been made independent of current working directory.
- Input ZIP-Files will be closed when using a <zipfileset>.
- p4 tasks now don't fail if user, port or client have been omitted
(and this is acceptable for the context of the command).
- <javah>'s outputfile attribute will be resolved as relative to the
- <antstructure> should create a valid DTD for propertyfile.operation.entry
and omit tasks it fails to load.
- won't try to pass a -bootclasspath flag to javac 1.1 anymore
- <style>'s style attribute no handles absolute paths correctly.
- <delete includeemptydirs="true"> now deletes more than just the leaf
- You can now specify a <fileset> for a directory that doesn't exist at
declaration time but will created before the fileset gets used for the
- If the quiet attribute has been set, <delete> will handle <fileset>s
with non-existing directories gracefully.
- Output written by testcases will now be captured by the <junit> task
and passed to the formatters.
- Quote the -group parameter to Javadoc as per the specification
- Initialise classes when loaded through the AntClassLoader - that is, run
- Implement getResource() and getResources() in AntClassLoader
- Create the <ejbjar> weblogic command line as a set of arguments rather than
as a single line. Avoids problems with paths which contain spaces.
- <ejbjar> now fails when the weblogic ejbc compiler reports an error.
- Make the AntClassLoader load resources in the same order as it currently
- Handle classpaths with spaces
- Make sure XSLT processors close their output files in <style>.
- perform proper uptodate check in <rmic> when compiling for IIOP.
- <jjtree>'s uptodate test works even if outputdirectory is not the
parent dir of target
- <copy> will remove target file (if it exists) before writing to it -
this avoids problems with links on filesystems that support them.
- <ftp> now properly recurses remote directories.
- <ftp> closes remote connection when it's done.
- <junit> tries to include all necessary classes for the task itself
to the classpath when running in fork mode - doesn't work for JDK 1.1
- <apply> and <execon> do now execute the command only once, if you
specify the parallel attribute - instead of once per fileset.
- directory based tasks and fileset could miss some included files in
directories that have been excluded
- <fixcrlf> failed for large files.
- <move> removed files you tried to move to themselves.
- <sql> task will not try to print the result set unless the query succeeded.
- Ant classloader will now ignore paths which are invalid relative to the
- <ejbjar> weblogic elements check for jar file changes has been fixed.
Previously some changes would not be included.
- properties loaded from properties files are now resolved internally. This
removes the spurious warnings about usage of properties which have not been
- <jar> task and friends now process the JAR manifest to ensure it is valid.
- The task finished event now includes any exception thrown by the task.
- <java> task now supports a jvmVersion attribute so that if another JVM is
being used, Ant can determine which options to use for features such as the
VM memory limits