Apache Ant Changelog

What's new in Apache Ant 1.10.14

Aug 22, 2023
  • Ant 1.10.14 contains an important change wherein it no longer uses or sets Java SecurityManager when running on Java versions 18 and higher. This should allow projects to build on Java 18 and higher versions.

New in Apache Ant 1.10.13 (Jan 10, 2023)

  • Changes that could break older environments:
  • has a new attribute authenticateOnRedirect that can be used to prevent Ant from sending the configured credentials when following a redirect. It is false by default, which means builds that rely on credentials being used on the redirected URI may break. Github Pull Request #173
  • Fixed bugs:
  • the PropertyEnumerator change introduced in 1.10.9 proved to be not fully backwards compatible when combined with certain custom PropertyHelper implementations - for example when using AntXtras. Bugzilla Report 65799
  • legacy-xml reporter of the junitlauncher task now escapes ]]> when writing CDATA. Bugzilla Report 65833
  • may leak connections when trying to preserve the last modified timestamps of files transferred recursively from a server. Bugzilla Report 66001
  • tstamp task would in certain cases parse the SOURCE_DATE_EPOCH environment variable value to an incorrect date. This has now been fixed. Github Pull Request #186
  • fetch.xml didn't set up non-default repositories propery and thus failed to download JAI. Github Pull Request #191
  • When building and installing Ant distribution from source, the build script would change permissions on unrelated files in the destination directory. This is now fixed and such unrelated files in the destination directory will be left untouched. Bugzilla Report 66164
  • parsing tar entries with multiple NUL bytes in their name would include garbage bytes as the name included all bytes up to the last NUL rather than the first. Github Pull Request #194
  • loadresource might log warnings even though quiet was set to true Bugzilla Report 65647
  • javac task would add paths constructs containing wildcards to the internally created argument file where wildcards are not allowed Bugzilla Report 65621
  • Other changes:
  • added an implementation of the MIME Mail sender based on the repackaged Jakarta Mail package rather than javax Mail. Github Pull Request #161
  • The "listener" element in the junitlauncher task now supports an "extension" attribute to control the filename extension of the generated output file from the listener. Github Pull Request #168
  • now supports FTPs. Github Pull Request #170
  • DirectoryScanner avoids listing directory contents when it known it will never use the information retrieved. This may improve performance in some special cases. Bugzilla Report 66048
  • will now create the parent directory of the manifestFile attribute if it doesn't exist. Bugzilla Report 66231
  • org.apache.tools.ant.BuildLogger now has a new method getMessageOutputLevel() which returns the currently set message output level.

New in Apache Ant 1.10.12 (Oct 19, 2021)

  • Fixed bugs:
  • The http condition would follow redirects even when "followRedirects" attribute was set to "false". This has now been fixed.
  • Made sure setting build.compiler to the fully qualified classname that corresponds to extJavac or modern has the same effect as using the shorter alias names.
  • Prevent potential deadlocks in org.apache.tools.ant.IntrospectionHelper.
  • Other changes:
  • The implementation of AntClassLoader#findResources() has been changed to optimize it for potential performance issues, as those noted at https://issues.jenkins.io/browse/JENKINS-22310?focusedCommentId=197405page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-197405
  • AntClassLoader now implements the ClassLoader#findResource(String) method.
  • Ant tries to avoid file name canonicalization when possible.
  • javadoc task will now look for warning messages in the STDERR stream too when "failonwarning" is set to true to account for changes in JDK 17+
  • The tar task now preserves symlinks of nested tarfilesets.

New in Apache Ant 1.10.11 (Jul 14, 2021)

  • Fixed bugs:
  • a race condition could lead to NullPointerExceptions when running tasks in parallel. Bugzilla Report 65316
  • Other changes:
  • org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.JUnitLauncherTask now has a new protected createExecuteWatchdog() method for allowing it to be overriden. Github Pull Request #147
  • Upgraded AntUnit to 1.4.1.

New in Apache Ant 1.9.16 (Jul 14, 2021)

  • Other changes:
  • Upgraded AntUnit to 1.4.1.
  • Fixed bugs:
  • Fixes a bug where the ant-testutil-sources.jar that gets published to Maven central repository didn't contain any source files. Bugzilla Report 65110

New in Apache Ant 1.10.10 (Apr 19, 2021)

  • Fixed bugs:
  • SCP (with sftp=true) task would fail if fetching file located in root directory
  • javac task would fail if the arguments file it (internally) created didn't quote the # character. This has now been fixed.
  • made sure LegacyXmlResultFormatter encodes characters illegal in XML the same way JUnit5's built-in formatter would.
  • LegacyXmlResultFormatter no longer double-encodes & in system-err and system-out
  • Fixes a bug in junitlauncher task's legacy-xml formatter, where the testcase representing a @Parameterized JUnit4 test wasn't being reported in the XML.
  • Fixes a bug where the ant-testutil-sources.jar that gets published to Maven central repository didn't contain any source files.
  • The condition didn't follow redirects from http to https.
  • ZipOutputStream now overrides write(int) in order to make sure single byte writes get the same treatment as array writes.
  • Fixes a potential deadlock in junitlauncher task when using legacy-xml reporter.
  • Other changes:
  • javaversion condition now has a new "atmost" attribute. See the javaversion manual for more details
  • The "listener" nested element of the "junitlauncher" task now has a new "useLegacyReportingName" attribute which can be used to control the test identifiers names that get reported by the listener. See the junitlauncher manual for more details.
  • Note that this change also introduces a new "setUseLegacyReportingName" method on the org.apache.tools.ant.taskdefs.optional.junitlauncher.TestResultFormatter interface. This will break backward compatibility with any of your custom result formatters which implemented this interface and such implementations are now expected to implement this new method.
  • a new attribute preserveduplicates allows to return the same resource multiple times when set to true.
  • a new attribute filterbeforeconcat in can be used to decide whether the filterchain should be applied to the concatenated content (the default) or each nested resource individually before concatenating them.
  • the ssh tasks now share a new nested element additionalConfig that can be used to set config values for the jsch Session used by the task.
  • added new discardOutput and discardError properties to redirector and the exec, apply and java tasks which can be used to completely discard any (error) output. This is a platform independent alternative to directiong output to any kind of null device.

New in Apache Ant 1.9.15 (May 14, 2020)

  • Other changes:
  • The runant.py script should now work with Python 3.
  • Rmic has been removed from Java 15. The task will now throw an exception if you try to use it while running Java 15 or newer.
  • A new property ant.tmpdir provides improved control over the location Ant uses to create temporary files

New in Apache Ant 1.10.8 (May 14, 2020)

  • Fixed bugs:
  • "legacy-xml" formatter of junitlauncher task wasn't writing out the stacktrace for failures. This is now fixed.
  • Sshexec failed to write output to a file if the file didn't exist
  • Fixes a regression in javac task involving command line argument files.
  • Sshexec, sshsession and scp now support a new sshConfig parameter. It specified the SSH configuration file (typically ${user.home}/.ssh/config) defining the username and keyfile to be used per host.
  • "legacy-xml" formatter of junitlauncher task wasn't writing out exceptions that happen in @BeforeAll method of a test. This is now fixed.
  • Building Ant from source could result in the javadocs target failing if the optional dependencies were missing. This has now been fixed.
  • Fixes a potential ConcurrentModificationException in XMLLogger.
  • Fixes a bug in junitlauncher task in forked mode, where if a listener element was used as a sibling element for either the test or testclasses element, then the forked mode launch would fail.
  • Fixes an issue in AntStructure where an incorrect DTD was being generated.
  • Fixes an incorrect variable name usage in junit-frames-xalan1.xsl.
  • Other changes:
  • Org.apache.tools.mail.MailMessage will now send a fully qualified domain name in its HELO message.
  • The runant.py script should now work with Python 3.
  • Tstamp task now honors SOURCE_DATE_EPOCH environment variable for reproducible builds (https://reproducible-builds.org/specs/source-date-epoch/#idm55)
  • Rmic has been removed from Java 15. The task will now throw an exception if you try to use it while running Java 15 or newer.
  • A new property ant.tmpdir provides improved control over the location Ant uses to create temporary files

New in Apache Ant 1.10.7 (Sep 5, 2019)

  • Fixed bugs:
  • FTP still tries checking or entering directories after a timeout
  • junitlauncher - does not detect failure in @BeforeAll
  • Error using ant-1.10.6 with jdk
  • FTP task no longer duplicates a check for a file being a symlink.
  • junitlauncher task, when used in fork mode with "", used to create the wrong number of listeners per test class. This has now been fixed.
  • The "legacy-xml" junitlauncher task's listener would not include @ParameterizedTest testcases in its XML report file. This has now been fixed.
  • Other changes:
  • FTP task timeout improvements.
  • junitlauncher task now supports selecting test classes for execution, based on the JUnit 5 tags, through the new "includeTags" and "excludeTags" attributes.
  • prefer https over http when building ant itself, and in the ant documentation and sources
  • changed the references and Maven coordinates of JavaMail dependency to Jakarta Mail and thus javax.mail to jakarta.mail - and upgraded the dependency to 1.6.3.

New in Apache Ant 1.10.6 (May 8, 2019)

  • Changes that could break older environments:
  • image task no longer works on Java 9+ because internal classes supporting Java Advanced Imaging are removed; imageio task (based on ImageIO and AWT) is provided as a replacement.
  • junitlauncher task has changed the class names and package names of the task as well as some of the supporting classes of that task. If any code depended on these class or package names, they will have to be updated to reference these newly named classes. This however, doesn't impact build scripts if their reference to junitlauncher task was merely through the use of the element.
  • ClearCase#runS has been augmented by a two arg-version and the one-arg version will no longer be called. This may affect subclasses that have overridden runS.
  • Fixed bugs:
  • fetch.xml must retrieve runtime rather than compile dependencies for mail task.
  • Fixes an issue in junitreport task, which used to throw a java.net.MalformedURLException when saxon was used on Windows OS.
  • augment task now throws a BuildException (as noted in its manual) instead of a IllegalStateException in the absence of the "id" attribute.
  • org.apache.tools.zip.ZipOutputStream would sometimes potentially use an incorrect compression level for a zip entry. This is now fixed.
  • sync task, in some cases on case insensitive file systems, would consider a file in a destination directory to be orphaned and would delete it. This task has now been fixed to infer the case sensitivity of the filesystem of the destination directory.
  • Fixes a potential java.util.ConcurrentModificationException in org.apache.tools.ant.Project#getCopyOfReferences.
  • cccheckout would ignore an error of the "ls checkout" command even if failOnError was set to false.
  • The isreachable condition could in some cases return true even if the actual address could potentially be unreachable. This is now fixed and the resolved address is actually checked for reachability.
  • Fixes an issue where scp transfer completion tracking wasn't being triggered for 100% completion.
  • Other changes:
  • generatekey task now supports SubjectAlternativeName during key generation.
  • the selector has a new built-in algorithm 'lastmodified' which computes a value based upon the lastmodified time of the file.
  • junitlauncher task now supports running tests in a forked JVM. More details available in the junitlauncher task manual.
  • signjar and verifyjar now support the -providerName, -providerClass and -providerArg command line options of keytool via new attributes.
  • signjar and verifyjar now supported nested elements for command line arguments that are not supported explicitly by the tasks via attributes.
  • added several attributes to that support modules.
  • properties used or set by BuildFileTask/BuildFileRule are documented in MagicTestNames. A new magic property, ant.test.basedir.ignore, is introduced for cases where Ant projects set up for test purposes must ignore basedir set externally by test harness.
  • a new CharSet type is provided for encoding or charset attributes in tasks that must deal with different character encodings in files, file names and other string resources.
  • org.apache.tools.ant.AntClassLoader is now multi-release jar aware. Starting Java 9, jar files can be packaged as multi-release jars, AntClassLoader now recognizes such multi-release jar files while loading resources at runtime in Java 9+ runtime environments.
  • Added jmod and link tasks, to support jmod and jlink tools of JDK 9+.
  • Jsch library dependency has now been upgraded to 0.1.55. Jsch is the library behind the sshexec and scp Ant tasks.
  • The "http" condition, now has a "readTimeout" attribute which can be used to control the amount of time to wait for the read to complete.
  • ftp task manual has been updated to mention that the remote listing of files honours the followsymlinks attribute.

New in Apache Ant 1.9.14 (Mar 18, 2019)

  • Changes that could break older environments:
  • ClearCase#runS has been augmented by a two arg-version and the one-arg version will no longer be called. This may affect subclasses that have overridden runS.
  • Fixed bugs:
  • fetch.xml must retrieve runtime rather than compile dependencies for mail task.
  • augment task now throws a BuildException (as noted in its manual) instead of a IllegalStateException in the absence of the "id" attribute.
  • org.apache.tools.zip.ZipOutputStream would sometimes potentially use an incorrect compression level for a zip entry. This is now fixed.
  • cccheckout would ignore an error of the "ls checkout" command even if failOnError was set to false.
  • Other changes:
  • generatekey task now supports SubjectAlternativeName during key generation.
  • the selector has a new built-in algorithm 'lastmodified' which computes a value based upon the lastmodified time of the file.
  • signjar and verifyjar now support the -providerName, -providerClass and -providerArg command line options of keytool via new attributes.
  • signjar and verifyjar now supported nested elements for command line arguments that are not supported explicitly by the tasks via attributes.
  • added several attributes to that support modules.
  • Jsch library dependency has now been upgraded to 0.1.55. Jsch is the library behind the sshexec and scp Ant tasks.
  • ftp task manual has been updated to mention that the remote listing of files honours the followsymlinks attribute.

New in Apache Ant 1.10.5 (Jul 16, 2018)

  • Fixed bugs:
  • Fixes a regression in the "get" task where redirects from a HTTP resource to a HTTPS resource started throwing an exception. Bugzilla Report 62499
  • The new allowFilesToEscapeDest didn't work when set to false and archive entries contained relative paths with so many ".." segnments that the resulting path would go beyond the file system root. Bugzilla Report 62502
  • Other changes:
  • Java task now accepts a "sourcefile" attribute to allow single file source program execution, a feature that is introduced in Java 11.

New in Apache Ant 1.10.4 (Jun 23, 2018)

  • Changes that could break older environments:
  • , and will no longer extract entries whose names would make the created files be placed outside of the destination directory anymore by default. A new attribute allowFilesToEscapeDest can be used to override the behavior. Another special case is when stripAbsolutePathSpec is false (which no longer is the default) and the entry's name starts with a (back)slash and allowFilesToEscapeDest hasn't been specified explicitly, in this case the file may be created outside of the dest directory as well. In addition stripAbsolutePathSpec is now true by default. Based on a recommendation by the Snyk Security Research Team.
  • Fixed bugs:
  • Delay the class initialization of the test classes until they are passed to JUnit. This way we can avoid that failing static initializers from non-test classes are reported as error when the 'skipNonTests' option is 'true'. Bugzilla Report 60062
  • The junit task when used with includeantruntime="no" was incorrectly printing a warning about multiple versions of ant detected in path
  • died with a NullPointerException since Ant 1.10.2. Bugzilla Report 62335
  • The task would fail with "java.lang.ClassFormatError: Invalid Constant Pool entry Type 19" while parsing a module-info.class. The task is compatible with Java bytecode version 53 now. Bug reported by Simon IJskes https://issues.apache.org/jira/browse/NETBEANS-781
  • Default and SecureInputHandler will now raise an error when then end of the input stream (usually System.in or System.console) are reached before a valid input has been read.
  • junitreport does not list testsuites that fail to start any tests because of an exception inside the all-tests and alltests-errors frames. Bugzilla Report 62443
  • Other changes:
  • AntAssert is deprecated, assertThat from JUnit 4.4+, Hamcrest matchers and/or ExpectedException rule provide equivalent functionality
  • PumpStreamHandler now explicitly verifies the streams for output and error are not null and will throw an exception if they are. This way creating a PumpStreamHandler will fail early as opposed to some obscure errors later when closing streams or finishing threads might fail. Bugzilla Report 62148
  • has a new attribute runtime which can be used to set properties with values taken as snapshots from the availableProcessors, freeMemory, maxMemory and totalMemory methods of the Java Runtime class.
  • linecontains filter now has a new "matchAny" attribute which when set to "true" allows any (instead of all) of the user-specified strings to be present in the line. Bugzilla Report 62313
  • has a new basedir attribute that can be used to resolve relative names and provides a root for the FileResources generated. Bugzilla Report 62379
  • The and nested elements of and now support an encoding attribute that can be used to specify the file's encoding. Bugzilla Report 62379
  • New file selectors, posixGroup and posixPermissions, are available. The new selectors and related ownedBy selector have "followSymlinks" attribute that defaults to "true" for consistency. Bugzilla Report 22370
  • The junitlauncher task now has a "printSummary" attribute which when set to "true" will print the test execution summary to System.out.

New in Apache Ant 1.10.3 (Mar 28, 2018)

  • Changes that could break older environments:
  • Previous versions of Ant's copy task would throw a BuildException if the "name" of the resource to copy was null. Starting this version, the copy task instead silently skips such resources and no longer throws an exception. ant-dev list https://www.mail-archive.com/[email protected]/msg46634.html
  • Reverted the signature change of various clone method implementation in Ant's data-types introduced with 1.10.2 as they broke subclasses of said data-types which tried to override clone.
  • Fixed bugs:
  • Fixed NullPointerException in ChainedMapper Bugzilla Report 62086
  • Fixed NullPointerException when a mappedresource is used in pathconvert Bugzilla Report 62076
  • Fixed an issue where a string, when used as a resource collection, within tokens, would be replaced by property values Bugzilla Report 62147
  • Added a workaround for a bug in the jarsigner tool to which requires the -storepass command line argument when verifying signatures using -strict together with a PKCS12 keystore. Unlike when signing the jar it will not prompt for the keystore's password and read it from standard input. This means Ant will now pass the keystore's password on the command line when using , which poses a security risk you should be aware of. Bugzilla Report 62194
  • Other changes:
  • Allow Saxon to be used for junitreport XSL transformation Github Pull Request #57
  • when running on Java 11+ rmic will fail early if iiop or idl are requested. Java11 removes support for CORBA and the switches have been removed from the rmic tool.
  • A new junitlauncher task which support JUnit 5 test framework. Bugzilla Report 61796

New in Apache Ant 1.10.2 (Feb 7, 2018)

  • Changes that could break older environments:
  • updated the dependency of BCEL to 6.2. Bugzilla Report 61196
  • delete task previously would silently accept wildcard (*) value for the "file" attribute. That's no longer the case and an exception could get thrown by the underlying filesystem for such use.
  • Commons Net 3.6 is binary-code, but not source compatible; see change list of Commons Net 3.0 for details
  • The Log4jListener is marked as deprecated as the required log4j library (in version 1.x) is not maintained any more.
  • Image task is marked as deprecated as the required JAI library is not maintained any more and internal APIs that JAI depended on are no longer available in Java 9.
  • Fixed bugs:
  • 's child now skips s that lack a key or value. Bugzilla Report 60767
  • bootstrapping Ant on Windows failed Bugzilla Report 61027
  • Fixed the issue where the SCP based tasks would try to change the permissions on the parent directory of a transferred file, instead of changing it on the transferred file itself. Bugzilla Reports 59648 and 43271
  • Fixed the issue where the source file being copied could end up being corrupted if the target of the copy happened to be the same source file (symlinked back to itself). Bugzilla Report 60644
  • Fixed the issue where symlink creation with "overwrite=false", on existing symlink whose target was a directory, would end up creating a new symlink under the target directory. Bugzilla Report 58683
  • Improvement to the Zip task for reduced memory usage in certain cases. Thanks to Glen Lewis for reporting the issue and suggesting the fix. Bugzilla Report 19516
  • Fixed an issue where the content redirected from output/error streams of a process, could end up being truncated. Bugzilla Report 58833, 58451
  • // will now throw an exception with a more useful error message when setFile is called twice on the same instance. Bugzilla Report 62071
  • Other changes:
  • Added forceCsvQuoteChar option to task. When enabled the values always get quoted. Github Pull Request #32
  • Added attributes to various script related tasks and a compiled attribute to scriptdef. Github Pull Request #30
  • Added support for jarsigner's -tsadigestalg to . Bugzilla Report 60665
  • added "regexp" attribute to Bugzilla Report 60968
  • reduced GC pressure by replacing all usage of FileInputStream and FileOutputStream.
  • Task can now also use attribute setters that expect a java.nio.file.Path argument. Bugzilla Report 61042
  • added a new magic property ant.tstamp.now that can be used to override the current time/date used by . Bugzilla Report 61079
  • added Orion support to ejbjar Github Pull Request #33
  • SCP task, when configured to use SFTP protocol, now preserves last modified timestamp on files that it uploads, if the preserveLastModified attribute is set to true for that task Bugzilla Report 58589
  • zip and the related tasks can now set the modification time of all entries to a fixed timestamp. Github Pull Request #36
  • Jsch library dependency has now been upgraded to 0.1.54. Jsch is the library behind the sshexec and scp Ant tasks. Bugzilla Report 61718
  • Added a new condition.
  • added "javac10+" as new supported value for javac's compiler attribute.
  • javah has been removed from Java 10. The task will now throw an exception if you try to use it while running Java 10 or newer.
  • Updated Maven Ant Tasks, Jakarta Regexp and JUnit 4 to the latest stable version (2.1.3, 1.4, and 4.12 respectively); updated JRuby to the latest Java 5 compatible version (1.6.8); added resolve target for AntUnit to facilitate updates. Github Pull Request #50
  • Updated Java Mail API, Jython, Rhino and Commons Net to the latest stable version (1.6.0, 2.7.0, 1.7.7.2 and 3.6, respectively). Github Pull Request #53

New in Apache Ant 1.10.1 (Feb 6, 2017)

  • The new releases revert a change to 1.9.8 and 1.10.0 that broke Eclipse integration and also fixes the ant wrapper script for Solaris 10. In addition 1.10.1 adds tasks and types that support XZ compression with the help of the XZ for Java library.

New in Apache Ant 1.10.0 (Jan 3, 2017)

  • Changes that could break older environments:
  • Ant 1.10.x requires Java8 or newer at compile or build time. The 1.9.x series wil stay compatible with Java5.
  • The task has been removed since apt itself has been removed with Java8.
  • // exhibited undefined behavior when both the dir and file attribute have been used on the same instance. This will now cause the build to fail. Bugzilla Report 59402
  • will default to the builtin implementation on Java8 as well (sun isn't available for Java9+ anyway).
  • The ant.java.version property will now hold the value "9" rather than "1.9" if running on Java 9.
  • will no longer allow the -Xnew option (or xmic compiler) to be used when running on Java 9 since this option has been removed. Bugzilla Report 59906
  • will default to the "forking" implementation on Java8 as well.
  • Fixed bugs:
  • setDynamicAttribute on MacroInstance now lower-cases the attribute name in order to allow users of the API to use the attributes names they have specified. Bugzilla Report 59339
  • 's quiet attribute was broken, it didn't suppress any messages. Bugzilla Report 59379
  • 's check whether an archive is already up-to-date failed on NTFS filesystems and re-created archives more often than necessary. Bugzilla Report 59562
  • AntClassLoader didn't delegate to the parent loader for classes in the "jdk" package or one of its subpackages. This hierarchy has been introduced with Java 7. Bugzilla Report 59556
  • The ant wrapper script used on Unix-like operating systems only worked on OSes where sed is GNU sed. Bugzilla Report 59898
  • 's default pattern as well as the default patterns used by the (resource) selectors depended on the JDK being used - or rather the locale provider being used and the default locale provider changed with Java 9. They are now fixed and the documentation has been updated to reflect the real patterns used rather than a non-formal description of the expected format. Bugzilla Report 59909
  • Clarified the documentation of 's retries attribute. Bugzilla Report 59930
  • The ant wrapper script failed if backticks were passed on the command line. Bugzilla Report 60150, 59445
  • The report generated by could contain duplicate characters in stack traces. Bugzilla Report 58661
  • Other changes:
  • New file selectors , and .
  • New task that provides the ability to set POSIX compatible permssions via NIO's PosixFilePermission
  • now initializes the cause of the AssertionFailedError when converting from AssertionError. Bugzilla Report 58982
  • now supports compression via the optional compressed attribute. Bugzilla Report 47552
  • now supports JDK9 modules Github Pull Request #18
  • a new implementation "builtin" has been added to and is the default when running on JDK9+ since the tool itself has been removed from the JDK. Bugzilla Report 59855
  • added a new filter that can perform non-ASCII to Unicode-escape conversions.
  • defaults to the "forking" compiler on JDK 9+ as the implementation class of rmic is not exported by its containing module and thus not accessible to Ant without applying -XaddExports magic. Bugzilla Report 59860
  • a new implementation "forking" has been added to and is used as default when running on JDK9.
  • support for javac's -h switch has been added with the nativeheaderdir attribute. Bugzilla Report 59905
  • it is now possible to set features of the TraX factory used by and .
  • it is now possible to use references to Ant types and classloaders built around Ant s as values for TraX factory attributes.
  • AntClassLoader and its subclasses register themselves as parallel capable.
  • now enables the feature http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions when run on Java 9 so the redirect extension function can be used if when a SecurityManager is active. Bugzilla Report 60060
  • support for javac's --release switch introduced with Java9 has been added. Bugzilla Report 60172

New in Apache Ant 1.9.7 (Apr 12, 2016)

  • Changes that could break older environments:
  • and used to ignore the dir attribute if it was the same as the current working directory. They now no longer do, which changes the behavior for vmlauncher="false" which would have used the project's basedir rather than the current working directory in that case.
  • Fixed bugs:
  • ZipOutputStream could cause an ArrayIndexOutOfBoundsException when adding entries with comments. This never happens when using Ant as a build tool but may affect users using Ant's zip package as a library.
  • and didn't work for non-filesystem resources.
  • ignored the zip64Mode attribute when creating manifest-only jars. This resulted in jar files that couldn't be read by Java5. Bugzilla Report 58428
  • will now detect GNU tar longname/link records even if they don't use the names used by GNU tar itself. star is known to create archives of that kind.
  • could fail to find javax.script on JDK9 with Jigsaw.
  • sometimes failed to normalize file names which could lead to files getting imported twice which in turn could lead to targets getting executed twice.
  • TarInputStream now properly extraxt directory entries with a non-zero size.
  • would drop file resources pointing to the same file but using different names.
  • 's result was undefined when using the replacefilterfile attribute and some keys inside the properties files have been substrings of other keys. Keys are now sorted by descending size.
  • Ant fails to run when arguments contain double-quote character.
  • Ant fails to run if ANT_HOME contains a double-quote character.
  • Definer's way to parse URLs from classloader breaks with recent Java 9 builds (b108).
  • and now preserve the ext status set by an task.
  • Other changes:
  • now supports (filesystem-only) resource collections in addition to filesets.
  • The condition has a new optional attribute followRedirects.
  • now supports Java9 modules.
  • now supports Java9 modules.
  • and have two new attributes serverAliveInterval and serverAliveCountMax that can be used to keep a intermediaries from closing idle connections.

New in Apache Ant 1.9.6 (Jul 10, 2015)

  • Fixed bugs:
  • ArrayIndexOutOfBoundsException when ZIP extra fields are read and the entry contains an UnparseableExtraField.
  • Other changes:
  • Hidden resource is published now. It reads the value of a specified java constant.

New in Apache Ant 1.9.5 (Jun 4, 2015)

  • Changes that could break older environments:
  • The ReplaceTokens filter can now use token-separators longer than one character. This means it can be used to replace mustache-style {{patterns}} and similar templates. This is going to break code that invokes the setters on ReplaceTokens via the Java API as their parameters have been changed from char to String. It may also break build files that specified multi character tokens and relied on Ant silently ignoring all but the first character. Bugzilla Report 56584
  • The changes that added 's support for gzip encoding automatically uncompressed content that would not have been touched before - like when downloading .tar.gz files. A new flag has been added to control the behavior and its default will make work as it did in 1.9.3. I.e. if you want it to work like 1.9.4 you have to explicitly set tryGzipEncoding to true. Bugzilla Report 57048
  • Fixed bugs:
  • TarArchiveInputStream failed to read archives with empty gid/uid fields. Bugzilla Report 56641
  • TarArchiveInputStream could throw IOException when reading PAX headers from a "slow" InputStream.
  • XMLJunitResultFormatter could throw NullPointerException if Java cannot determine the local hostname. Bugzilla Report 56593
  • URLResource#getLastModified tried to access the connection to the URL without making sure it was established, potentially leading to a NullPointerException when using FTP. Bugzilla Report 56873
  • Long-Name and -link or PAX-header entries in TAR archives always had the current time as last modfication time, creating archives that are different at the byte level each time an archive was built.
  • runant.py should now work as well when the path of the Java executable contains spaces. github pull request #1
  • now supports nested and elements. Bugzilla Report 47002
  • complete-ant-cmd.pl now also knows about the -file option. Bugzilla Report 57371
  • the br-replace template inside the XSLT stylesheets used by could cause stack overflows or out-of-memory errors when applied to big outputs. Bugzilla Report 57341
  • removed spurious warning about unclosed ZipFiles when reading the archive failed. Port of https://issues.apache.org/jira/browse/COMPRESS-297
  • FileUtils.rename which is used by several tasks can throw a NullPointerException if the "normal" renameTo operation fails and an exception occurs while rename falls back to copying and deleting the file. Bugzilla Report 57533
  • complete-ant-cmd.pl would incorrectly suggest words from the build file description. Bugzilla Report 51931
  • complete-ant-cmd.pl now also completes tasks without a description. Bugzilla Report 57542
  • LocalPropertyStack could run into ConcurrentModificationException when tasks spawned new child threads that accessed the properties. Bugzilla Report 55074
  • TarEntry's constructor with a File and a String arg didn't normalize the name.
  • Between 1.8.4 and 1.9.0 TarInputStream started to parse file names using the platform's default encoding rather than as ASCII. This has been a breaking change that has never been marked as such (in fact it went unnoticed). In order to allow and to work on platforms who's encoding doesn't match the encoding of file names inside the archive, both now support encoding attributes. The attribute has also been added to for symmetry. Bugzilla Report 57822
  • Other changes:
  • it is now possible to provide proxy configuration to signjar when using the timestamped authority. Bugzilla Report 56678
  • complete-ant-cmd.pl now also analyzes the ANT_ARGS environment variable. Bugzilla Report 57371
  • ported some of the write-optimization of Commons Compress 1.10 to the ZIP package
  • adapted unit tests to Java9 and added "javac1.9" as valid option for javac's compiler attribute.
  • performance improvements for Bugzilla Report 57588
  • MailLogger can now add CC and BCC addresses. Bugzilla Report 57789.
  • 's buffer size has been increased from 1k to 100k to match and . github pull requests #8 and #9
  • The tar package can now deal with group and user ids bigger than 0x80000000. https://issues.apache.org/jira/browse/COMPRESS-314 https://issues.apache.org/jira/browse/COMPRESS-315
  • has new attributes fileMode and dirMode that control the permissions on the remote side when sending data via SSH. Bugzilla Report 43271.
  • New and resource collections can be used to select all but a given subset of a resource collection. Bugzilla Report 57834.

New in Apache Ant 1.9.4 (May 6, 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 Apache Ant 1.9.3 (Dec 30, 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 Apache Ant 1.9.2 (Jul 13, 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 Apache Ant 1.9.1 (May 22, 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 Apache Ant 1.9.0 (Mar 11, 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 Apache Ant 1.8.4 (Aug 1, 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 Apache Ant 1.8.3 (Mar 1, 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 Apache Ant 1.8.2 (Jan 4, 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 Apache Ant 1.8.1 (May 10, 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.

New in Apache Ant 1.8.0 (Apr 13, 2010)

  • Lexically scoped local properties, i.e. properties that are only defined inside a target, sequential block or similar environment.
  • can now import from any file- or URL-providing resource - this includes .
  • Various improvements to the directory scanning code that help with symbolic link cycles (as can be found on MacOS X Java installations for example) and improve scanning performance. For big directory trees the improvement is dramatic.
  • The way developers can extend Ant's property expansion algorithm has been rewritten (breaking the older API) to be easier to use and be more powerful.
  • a new top level element extension-point allows build files to be extended with custom targets more easily
  • At the same time the if and unless attributes have been rewritten to do the expected thing if applied to a property expansion (i.e. if="${foo}" will mean "yes, do it" if ${foo} expands to true, in Ant 1.7.1 it would mean "no" unless a property named "true" existed). This adds "testing conditions" as a new use-case to property expansion.
  • Ant now requires Java 1.4 or later
  • new task include provides an alternative to that should be preferred when you don't want to override any targets
  • numerous bug fixes and improvements as documented in Bugzilla and in WHATSNEW

New in Apache Ant 1.7.1 (Sep 23, 2008)

  • String resources only have properties single expanded. If you relied on resources being expanded more than once, it no longer happens.
  • A String resource's encoding attribute was only taken into account when set from the resource's OutputStream; the InputStream provided the String's binary content according to the platform's default encoding. Behavior has been modified to encode outgoing (InputStream) content as well as encoding incoming (OutputStream) content.
  • with fork now returns gives -1 instead of 0 as result when failonerror is false and some exception (including timeout) occurs.
  • ant-type attribute has been marked as deprecated and a warning has been issued if it is encountered in the build file.
  • FileUtils.createTempFile now actually creates the file. The TempFile task still does not create the file by default, can be instructed to do so however using a new parameter.
  • The default logger was failing to print complete stack traces for exceptions other than BuildException, thus omitting often important diagnostic information.
  • Error in FTP task
  • Regression: Locator fails with URI encoding problem when spaces in path
  • Regression in Locator: running Ant off a network share does not work: message "URI has authority component" appears
  • Improvements in AntClassLoader Speed.
  • Error in handling of some permissions, most notably the AllPermission on jdk 1.5
  • Replace task summary output incorrect.
  • Dependset crashes ant when timestamp on files change during Dependset execution.
  • Bug in org.apache.tools.ant.types.resources.comparators.Date
  • in Ant 1.7.0 could throw NPE if no was defined.
  • In Ant 1.7.0, in does not by default include only **/*.java as the documentation claims and earlier revisions did.
  • SPI support in jar was broken.
  • Ssch-0.1.30 causes SCP task to hang
  • Target from imported file listed twice in projecthelp.
  • task double-expands properties if expandproperties is true, and expands properties if expandproperties is false.
  • Rolling back Bugzilla 32927 (set a default description for a javadoc tag if not set) as it caused a BC problem.
  • forks properly and so memory settings are picked up.
  • Regression: NPE was thrown when using against a (third-party instantiated) fileset with null Project reference.
  • Strip out all -J arguments to non forking rmic adapters, specifically the Sun and Weblogic compilers.
  • Synchonization issues in PropertyHelper.
  • did not append.
  • -autoproxy turns Java1.5+ automatic proxy support on.
  • Handle null result of system getProperty().
  • Regression: concat fixlastline="true" should not have applied to nested text, but did in Ant 1.7.0.
  • Regression: ant.version was not passed down in , . This worked in Ant 1.6.5, but not in 1.7.0. ant.core.lib (added in 1.7.0) was also not being propagated.
  • Regression: bzip2 task created corrupted output files for some inputs.
  • Regression: with did not work.
  • ant script, cd may output to stdout.
  • Modified selector doesn't update the cache if only one file has changed.
  • Regression: Path subclasses that overrode list() stopped working in resourceCollection contexts in Ant 1.7.0.
  • War task failed with "No WEB-INF/web.xml file was added" when called a second time.
  • FilterMapper could throw an NPE.
  • Regession nested macrodefs with elements could cause StackOverFlow.
  • task couldn't differentiate between "no resources specified" and "no resources matched."
  • Some changes to broke third party tasks that extend it (like Apache Cactus' Ant task). The changes have been modified so that subclases should now work again - without any changes to the subclass.
  • Various small optimizations speed up common tasks such as on large filesets, reducing both I/O and CPU usage.
  • Profiling logger has been added with basic profiling capabilities.
  • now has basic support for JavaFX scripts
  • SSH task can now take a command parameter containing the commands to execute. This allows you to connect to a server and execute a number of commands without constantly reconnecting for each command.
  • Upgraded XML API to XML commons version 1.3.04.
  • Upgraded to Xerces 2.9.0
  • can now work with bsf.jar and js.jar in its .
  • add errorProperty and updatedProperty to
  • add classpathref attribute to
  • reduce logging noise of
  • Show Previous Revision in the tagdiff.xsl stylesheet
  • Allow to refer directly to a FileNameMapper instance.
  • If you try and use a type in a namespace (or an antlib), and the type is not recognized but there are other definitions in that namespace, Ant lists what the known definitions are. This helps you find spelling errors.
  • Add a resource collection, corresponding to .
  • Add new task.
  • xsl stylesheets allow setting the title used in and tags by using element.
  • Add IgnoreDependenciesExecutor for weird cases when the user wants to run only the targets explicitly specified.
  • Patternset allows nested inverted patternsets using .
  • checks for validity of attribute names.
  • JUnitVersionHelper.getTestCaseClassName is now public.
  • resource supports nested text.
  • now sources scripts from nested resources/resource collections. This lets you define scripts in JARs, remote URLs, or any other supported resource.
  • is now usable as a single-element ResourceCollection.
  • It is now possible to provide the value of a filter's nested element as nested text instead of using the 'value' attribute.
  • A new logger, BigProjectLogger, lists the project name with every target
  • Default text added to macrodef.
  • "rawblobs" attribute added to SQL task.
  • Add new retry task container.
  • has a new strict attribute that checks if the jar complies with the jar packaging version specification.
  • has a new attribute - includeDestClasses.
  • has a new attribute - errorOnMissingDir.
  • handles package-info.java files, there were repeatedly compiled.