Apache Ant Changelog

New in version 1.9.4

May 6th, 2014
  • Changes that could break older environments:
  • the prefixValues attribute of didn't work as expected when set to false (the default). It is quite likely existing build files relied on the wrong behavior and expect Ant to resolve the value side against the properties defined in the property file itself - these build files must now explicitly set the prefixValues attribute to true. Bugzilla Report 54769
  • when matching an entry of a zip/tarfileset against a pattern a leading slash will be stripped from the entry name. Most archives don't contain paths with leading slashes anyway. This may cause include/exclude patterns that start with a / to stop matching anything. Such patterns only used to work by accident and only on platforms with multiple file system roots. Bugzilla Report 53949
  • DirectoryScanner and thus fileset/dirset will now silently drop all filesystem objects that are neither files nor directories according to java.io.File. This prevents Ant from reading named pipes which might lead to blocking or other undefined behavior. Bugzilla Report 56149
  • BuildFileTest and BaseSelectorTest have both been deprecated in favour of BuildFileRule and BaseSelectorRule respectively, and the tests that previously extended these base tests have been converted to JUnit 4 tests using the new "rule"s. Any external test that sub-classed a test in the Ant workspace, rather than BuildFileTest, will need changed to either use JUnit4's annotations, or be modified to extend BuildFileTest directly. This will not affect any tests that are being executed by Ant's junit or batchtest tasks that are not specifically testing Ant's code.
  • Fixed bugs:
  • / failed when the importing file was loaded from an URI or a jar and it imported a file from the local file system via an absolute path. Bugzilla Report 50953
  • could import the same resource twice when imported via different resource types. Bugzilla Report 55097
  • several calls to File#mkdirs could fall victim to a race condition where another thread already created the same directory. Bugzilla Report 55290
  • created '/' rather than './' for the parent directory of the given jarfile. Bugzilla Report 55049
  • 's fixlastline="true" didn't work when using certain filter readers. Bugzilla Report 54672
  • several places where resources are read from jars will now explicitly disable caching to avoid problems with reloading jars. Bugzilla Report 54473
  • AntClassloader will now ignore files that are part of the classpath but not zip files when scanning for resources. It used to throw an exception. Bugzilla Report 53964
  • caused a NullPointerException when no destdir was set. Bugzilla Report 55949
  • would still include the Main section of the fileset manifests if there was no nested manifest or manifest attribute. Bugzilla Report 54171
  • reading of compiler args has become more defensive Bugzilla Report 53754
  • without force="true" would not only fail to overwrite a read-only file as expected but also remove the existing file. Bugzilla Report 53095
  • would remove symbolic links to not-included files. It will still delete symlinks to directories that would have been followed even if they are not explicitly included. exclude-Patterns can still be used to preserve symbolic links. Bugzilla Report 53959
  • Sometimes copy-operations using NIO FileChannels fail. Ant will now try to use a Stream based copy operation as fallback when the Channel based copy fails. Bugzilla Reports 53102 and 54397
  • Javadoc.postProcessGeneratedJavadocs() fails for Classes that extend Javadoc Bugzilla Report 56047
  • TarInputStream will now read archives created by tar implementations that encode big numbers by not adding a trailing NUL.
  • the isExists() method of URLResource returned false positives for HTTP and FTP URLs.
  • Other changes:
  • initial support for Java 1.9
  • can optionally pass System.in to the remote process Bugzilla Report 55393
  • now supports capturing error output of the executed process and setting a property from the return code. Bugzilla Report 48478
  • now has an option to fail if javadoc issues warnings. Bugzilla Report 55015
  • has a new outputencoding attribute. Bugzilla Report 39541
  • changes to JUnitTestRunner and PlainJUnitResultFormatter to make OutOfMemoryErrors less likely. Bugzilla Report 45536
  • changes to DOMElementWriter to make OutOfMemoryErrors less likely. Bugzilla Report 54147
  • has a new attribute binaryOutput that prevents Ant from splitting the output into lines. This prevents binary output from being corrupted but may lead to error and normal output being mixed up. Bugzilla Report 55667 Bugzilla Report 56156
  • the nested elements of now have an optional inputEncoding attribute that can be used to specify the encoding of files read that don't use the platform's default encoding. Bugzilla Report 56258
  • The task now explicitly accepts and supports the gzip content encoding. Bugzilla Report 49453
  • A new resourcecollection type acts like a union of s and s that share the same configuration but have different base directories. Bugzilla Report 48621
  • has a quiet attribute that makes the task log errors only when enabled. GitHub Pull Request #1
  • has now a threads attribute allowing to run the tests in several threads. Bugzilla Report 55925
  • addition of a new ProcessUtil class providing the process id of the current process
  • changes to allow to run the JUnit testcases of Ant in parallel, by making them use unique temporary directories

New in version 1.9.3 (December 30th, 2013)

  • Fixed bugs:
  • swallowed the status code of nested tasks.
  • a race condition could make tasks of parallel builds to interfere with each other.
  • 's mailport still didn't work properly when using smtps.
  • using attributes belonging to the if and unless namespaces made macrodef fail.
  • Ant 1.8 exec task changes have slowed exec to a crawl
  • Apt is not available under JDK 1.8
  • Other changes:
  • Documentation fix for if/unless attributes. PR 55359.
  • tar entries with long link names are now handled the same way as entries with long names.
  • Addition of 'skipNonTests' attribute to and tasks to allow the tasks to skip classes that don't contain tests.
  • now supports a nested to specify filters.
  • 's params can now be typed.
  • build of Mac OS X pkg installer

New in version 1.9.2 (July 13th, 2013)

  • Fixed bugs:
  • Parsing of zip64 extra fields has become more lenient in order to be able to read archives created by DotNetZip and maybe other archivers as well.
  • TarInputStream should now properly read GNU longlink entries' names. Bugzilla Report 55040.
  • and used to be too restrictive when evaluating whether a given set of options is compatible with spawning the new process. Bugzilla Report 55112.
  • Other changes:
  • will now post-process the generated in order to mitigate the frame injection attack possible in javadocs generated by Oracle JDKs prior to Java7 Update 25. The vulnerability is known as CVE-2013-1571. There is an option to turn off the post-processing but it is only recommended you do so if all your builds use a JDK that's not vulnerable. Bugzilla Report 55132.

New in version 1.9.1 (May 22nd, 2013)

  • new if and unless XML namespaces available on all tasks and nested elements
  • Zip64 extensions are disabled by default
  • Loading of external dependencies fixed in JUnit tasks
  • JUnitreport default stylesheets now compatible with JDK 1.7
  • Recommending to upgrade to jsch 0.1.50 for users of the ssh/scp tasks under Java 1.7
  • Other fixes and improvements documented in WHATSNEW

New in version 1.9.0 (March 11th, 2013)

  • Java 1.5 is now required
  • support for @Ignore annotation in JUnit 4 testcases
  • the minimum version of JUnit 4 required is JUnit 4.11
  • the zip, bzip2 and tar tasks are improved
  • removal of the Perforce Ant tasks; users of these tasks can use the tasks supplied by Perforce Inc. instead, which contain more functionality and connect natively to the Perforce servers
  • numerous bug fixes and improvements as documented in Bugzilla and in the release notes

New in version 1.8.4 (August 1st, 2012)

  • Ported libbzip2's fallback sort algorithm to CBZip2OutputStream to speed up compression in certain edge cases. Merge from Commons Compress.
  • Using specially crafted inputs this can be used as a denial of service attack.

New in version 1.8.3 (March 1st, 2012)

  • Changes that could break older environments:
  • The Enumeration returned by AntClassLoader#getResources used to return null in nextElement after hasNextElement would return false. It has been changed to throw a NoSuchElementException instead so that it now adheres to the contract of java.util.Enumeration. Bugzilla Report 51579.
  • Fixed bugs:
  • Removed buggy duplicate JAR list in RPM mode. Bugzilla Report 52556.
  • Launcher fixed to pass the right class loader parent. Bugzilla Report 48633.
  • mishandled ${line.separator}. Bugzilla Report 51049.
  • did not work in embedded environments on JDK 7. Nor did when using Xalan redirects. Bugzilla Report 51668, 52382.
  • Encoding of unicode escape sequences by the property file task Bugzilla Report 50515.
  • The code that implicitly sets the -source switch if only -target has been specified in was broken for Java 5 and 6. Bugzilla Report 50578.
  • MailLogger ignore the Maillogger.starttls.enable property. Bugzilla Report 50668.
  • Delete task example does not work Bugzilla Report 50816.
  • 's proxy handling has been delegated to internally so the two tasks are consistent. 's way of not setting a proxy caused problems with other Java libraries. Bugzilla Report 50888.
  • Include task breaks dependencies or extension-points for multiple files. Bugzilla Report 50866.
  • Read on System.in hangs for forked java task. Bugzilla Report 50960.
  • FileResource specified using basedir/name attributes was non-functional.
  • Resource collection implementation of mapped PropertySet returned unusable resources.
  • The hasmethod condition failed with a NullPointerException when ignoresystemclasses is true and Ant tried to load a "restricted class" - i.e. a class that the Java VM will only accept when loaded via the bootclassloader (a java.* class). It will now fail with a more useful error message. Bugzilla Report 51035.
  • Exec task may mix the stderr and stdout output while logging it Bugzilla Report 50507.
  • Missing space between "finished" and timestamp in task/target finish message from ProfileLogger. Bugzilla Report 51109.
  • Redirecting the output of a java, exec or apply task could print in the error output stream some "Pipe broken" errors. Bugzilla Report 48789.
  • ZipFile failed to clean up some resources which could lead to OutOfMemoryException while unzipping large archives. A similar problem in ZipArchiveOutputStream has been fixed as well. Bugzilla Report 42696.
  • quiet attribute added to the copy and move tasks, to be used together with failonerror=false, so warnings won't get logged Bugzilla Report 48789.
  • System.in was closed and not readable anymore by the DefaultInputHandler when Ant is used via its Java API. Bugzilla Report 51161
  • only supported a single non-fileset resource collection even though the manual said it could be multiple.
  • didn't work properly when working on resource collections. Bugzilla Report 51462.
  • cause a NullPointerException if it was used in a target that was invoked by multiple targets from the command line. Bugzilla Report 50894.
  • The ZipFile class could read past the start of the file if the given file is not a ZIP archive and it is smaller than the size of a ZIP "end of central directory record".
  • would create the empty package-info.class file in the wrong directory if no destdir was specified. Note it may still pick the wrong directory if you specify more than one source directory but no destDir. It is highly recommended that you always explicitly specify the destDir attribute. Bugzilla Report 51947.
  • packagemapper now honors the handleDirSep attribute. Bugzilla Report 51086.
  • the attributes of macrodef tasks had their values run through property expansion twice. Still true by default, but can be disabled. Bugzilla Report 42046.
  • jvc doesn't like it if source file names in argument files are quoted. Bugzilla Report 31667.
  • ZipFile didn't work properly for archives using unicode extra fields rather than UTF-8 filenames and the EFS-Flag.
  • Access to DirectoryScanner's default excludes wasn't synchronized. Bugzilla Report 52188.
  • When a Project instance was created by a custom tasks its createTask method didn't work. Bugzilla Report 50788.
  • Other changes:
  • -f/-file/-buildfile accepts a directory containing build.xml.
  • The , and now support a new maxmemory attribute. Bugzilla Report 50513.
  • the documented inputstring attribute of sshexec has been implemented and the actually existing attribute inputproperty documented. Bugzilla Report 50576.
  • The concat task now permits the name of its exposed resource by means of its 'resourcename' attribute.
  • The expandproperties filter now accepts a nested propertyset which, if specified, provides the properties for expansion. Bugzilla Report 51044.
  • will no longer filter out the very first line of the stacktrace containing the original exception message even if it matches one of the filter expressions.
  • Upgraded to Apache AntUnit 1.2
  • Provide read access to Mkdir.dir. Bugzilla Report 51684.
  • and have a new attribute performGCOnFailedDelete that may - when set to true - help resolve some problems with deleting empty directories on NFS shares. Bugzilla Report 45786.
  • and used to log at level INFO to signal a property hasn't been set when the resource was empty even if the quiet attribute was set to true. They will now use VERBOSE instead. Bugzilla Report 52107.
  • has a new attribute createMissingPackageInfoClass that can be set to false to prevent Ant from creating empty dummy classes used for up-to-date-ness checks. Bugzilla Report 52096.
  • URLResources#isExists has become less noisy. Bugzilla Report 51829.
  • The task has a new optional attribute retryDelay that can be used to make the task sleep between retry attempts. Bugzilla Report 52076.
  • has new attributes that control the signature and digest algorithms. Bugzilla Report 52344.
  • Initial support for Java 8.
  • can optionally create a pseudo terminal (like ssh -t) Bugzilla Report 52554.

New in version 1.8.2 (January 4th, 2011)

  • Changes that could break older environments:
  • Prior to Ant 1.8.0 the task and several other tasks would overwrite read-only destination files. Starting with 1.8.0 they would only do so under special circumstances. Ant 1.8.2 now consistently won't replace a read-only file by default. The same is true for a number of other tasks. The , and tasks now have a new force attribute and has a new forceReadonly attribute that can be used to make the task overwrite read-only destinations. Bugzilla Report 49261.
  • Removed ant-nodeps.jar; it is now merged into ant.jar.
  • DOMElementWriter#encode used to employ special code before encoding ampersands so that { remained { rather than being turned into {. This is no longer the case, ampersands will now be encoded unconditionally. Also DOMElementWriter#encodeData will treat CDATA sections containing a literal "]]>" sequence different now - it will split the CDATA section between the second "]" and ">" and create two sections. This affects task as well as the XML logger or JUnit formatter where ampersands will now always get encoded. In addition DOMElementWriter will now replace the characters \t, \r and \n in attribute values by entity references. Bugzilla Report 49404.
  • The list elements returned by ProjectHelper#getExtensionStack are now String arrays of length 3 rather than 2 in order to support the onMissingExtensionPoint attribute. Bugzilla Report 49473.
  • When using properties defined inside the same file will only get used in expansions if the ${} reference uses the same prefix. This is different from Ant 1.8.1 but is the same behavior Ant 1.8.0 and earlier exhibited. A new attribute prefixValues can be used to re-enable the behavior of Ant 1.8.1. Bugzilla Report 49373.
  • The files and directories used by Git, Mercurial and Bazaar to store their information are now excluded by the defaultexcludes. Bugzilla Report 49624.
  • The task no longer generates TestListener events - which have been introduced in ant 1.7.0 - by default. The task has a new attribute enableTestListenerEvents and a new "magic" property ant.junit.enabletestlistenerevents has been added that can be used to reinstate the old behavior.
  • Fixed bugs:
  • hostinfo now prefers addresses with a hostname over addresses without a hostname, provided the addresses have the same scope. For local lookup, no IP address will be put in NAME / DOMAIN anymore. For remote lookup, if a host name was provided and only an IP address is found, the IP address will no longer overwrite the host name provided to the task. Bugzilla Report 49513
  • mmap-based file copy problems under JDK 1.4 on Linux. Bugzilla Report 49430.
  • The Sun JVM tries to mmap the entire file during a copy. For large files this is not feasible. We now explicitly request to copy at most 16 MiB per request. Bugzilla Report 49326. * DemuxInputStream.read() should return unsigned values Bugzilla Report 49279.
  • The MIME mailer ignored the port parameter when using SSL. Bugzilla Report 49267.
  • ignored the classpath when using the default TraX processor. Bugzilla Report 49271.
  • 's totalproperty only worked reliably if the same file name didn't occur inside more than one directory. Bugzilla Report 36748.
  • could fail to download files from remote subdirectories under certain circumstances. Bugzilla Report 49296.
  • will now produce better diagnostics when it fails to delete a temporary file. Bugzilla Report 49419.
  • Ant would often scan directories even though there were known to only hold excluded files when evaluating filesets. This never resulted in wrong results but degraded performance of the scan itself. Bugzilla Report 49420.
  • failed for long command lines on OS/2. Bugzilla Report 49425.
  • did not handle encodings well for stdout/stderr. Bugzilla Report 49418.
  • could issue a warning about multiple versions of Ant on the CLASSPATH if two CLASSPATH entries differed in case on a case-insensitive file system. Bugzilla Report 49041.
  • The resource collection was checking every resource even if we actually just want the first one, like in the example of use of resourcelist in the documentation (getting the first available resource from a mirror list).
  • A race condition could lead to build failures if multiple tasks were trying to create the same directory. Bugzilla Report 49572.
  • the toString() method of the Resources class - and thus any ${toString:} expansion of a reference to a element - didn't iterate over its nested elements if it hadn't done so prior to the toString invocation already. Bugzilla Report 49588.
  • in parallel mode didn't work together with a nested if maxparallel was

New in version 1.8.1 (May 10th, 2010)

  • Changes that could break older environments:
  • ant-trax.jar is no longer produced since TrAX is included in JDK 1.4+.
  • Ant no longer ships with Apache Xerces-J or the XML APIs but relies on the Java runtime to provide a parser and matching API versions.
  • The stylebook ant task and the ant-stylebook.jar are removed.
  • Fixed bugs:
  • Tasks that iterate over task or type definitions, references or targets now iterate over copies instead of the live maps to avoid ConcurrentModificationExceptions if another thread changes the maps. Bugzilla Report 48310.
  • The filesmatch condition threw a NullPointerException when comparing text files and the second file contained fewer lines than the first one. Bugzilla Report 48715.
  • Regression: The task would allow multiple META-INF/application.xml files to be added. Bugzilla Report 6836.
  • VectorSet#remove(Object) would fail if the size of the vector equaled its capacity.
  • Regression : ant -diagnostics was returning with exit code 1 Bugzilla Report 48782
  • Fix for exec task sometimes inserts extraneous newlines Bugzilla Report 48746
  • SymlinkTest#testSymbolicLinkUtilsMethods failing on MacOS Bugzilla Report 48785.
  • If 's first resourcecollection child is a , any subsequently added child resourcecollection joins the first. Bugzilla Report 48816.
  • with an invalid URL could trigger an NPE in some JVMs. Bugzilla Report 48833
  • Broken Pipe issue under Ubuntu Linux Bugzilla Report 48789
  • Properties wrongly read from file or not update during read Bugzilla Report 48768
  • AntClassLoader in Ant 1.8.0 has been considerably slower than in 1.7.1 Bugzilla Report 48853
  • ANT_CMD_LINE_ARGS are rippling through lower level Ant usage Bugzilla Report 48876
  • email : IO error sending mail with plain mimetype Bugzilla Report 48932
  • the complete-ant-cmd.pl script failed to create a proper cache of target if "ant -p" failed. Bugzilla Report 48980
  • 's sourcebase attribute was broken. Bugzilla Report 48970
  • 's failonerror didn't work as expected when copying a single element resource collection to a file. Bugzilla Report 49070
  • no longer followed redirects if the redirect URL was relative and not an absolute URL. Bugzilla Report 48972
  • fixed a performance degradation in the code that expands property references. Bugzilla Reports 48961 and 49079
  • was broken on Windows. Bugzilla Report 49090
  • delete failed if the link attribute was a relative path to a link inside the current directory without a leading ".". Bugzilla Report 49137
  • and failed to find the expected strings when waiting for responses and thus always failed. Bugzilla Report 49173
  • Other changes:
  • Project provides new get methods that return copies instead of the live maps of task and type definitions, references and targets.
  • Ant is now more lenient with ZIP extra fields and will be able to read archives that it failed to read in earlier versions. Bugzilla Report 48781.
  • The family of tasks has been sped up for bigger archives. Bugzilla Report 48755.
  • Add removeKeepExtension option to NetRexxC task. Bugzilla Report 48788.
  • Add prefix attribute to loadproperties task.
  • Add resource attribute to length task.
  • PropertyResource will effectively proxy another Resource if ${name} evaluates to a Resource object.
  • Added forcestring attribute to equals condition to force evaluation of Object args as strings; previously only API-level usage of the equals condition allowed Object args, but Ant 1.8.x+ property evaluation may yield values of any type.
  • BuildFileTest.assertPropertyUnset() fails with a slightly more meaningful error message Bugzilla Report 48834
  • will now throw an exception if a test name is empty. This used to manifest itself in unrelated errors like Bugzilla Report 43586.
  • A change that made more reliable on Windows (Bugzilla Report 5003) strongly impacts the performance for commands that execute quickly, like attrib. Basically no single execution of a command could take less than a second on Windows. A few timeouts have been tweaked to allow these commands to finish more quickly but still they will take longer than they did with Ant 1.7.1. Bugzilla Report 48734.
  • Added SimpleBigProjectLogger, intermediate between NoBannerLogger and BigProjectLogger.
  • supports new attributes enablemultiplemappings and cache.
  • Added the augment task to manipulate existing references via Ant's basic introspection mechanisms.