Changes from Ant 1.4.1 to current CVS version ============================================== Changes that could break older environments: -------------------------------------------- * the RegexpMatcher interface has been extended to support case insensitive matches and other options - custom implementations of this interface won't work any longer. We recommend to use the new Regexp interface that also supports substitution instead of the RegexpMatcher interface in the future. * will throw an exception if your src attribute points to a directory. * Unjar, Unzip and Unwar will throw an exception if the Src attribute represents a directory. Support for nested filesets is provided instead. * It is no longer possible to overwrite a property using tasks like , , , or . In some exceptional cases it will generate a warning if you attempt to overwrite an existing property. * Taskwriters please note: Whenever tasks had any overloaded set* methods, Ant's introspection mechanism would select the last overloaded method provided to it by the Java Runtime. A modification has now been made such that when the Java Runtime provides a method with a String as its argument, a check is made to see if there is another overloaded method that takes in some other type of argument. If there is one such method, then the method that takes in String as an argument is not selected by the Introspector. * The pattern definition **/._* has been included into the Default Excludes list. * 's element was modified to remove "never" as a value as its behavior was undocumented and flakey. Fixed bugs: ----------- * Fixed bug where ignored s. * Ant works properly with the combination of Java1.4/WindowsXP * Fixed bug where used to sometimes invoke class constructors twice. * Fixed bug with 4NT shell support * Fixed bug where ant would not perform ftp without remotedir being specified even though this was not mandatory. * Fixed bug where ant would not copy system properties into new Project in ant/antcall tasks when inheritall="false" is set. * would not close the original property file. * will no longer override a subbuild's basedir with inheritall="true". * Fixed problem with the built-in formatters which assumed that only one test could be running at the same time - this is not necessarily true, see junit.extensions.ActiveTestSuite. * 's whenEmpty attribute is useless as JARs are never empty, they contain at least a manifest file, therefore it will now print a warning and do nothing. * hasn't been all that useful as it couldn't be used outside of targets (it can now) and nested "unknown" elements have always been considered to be tasks (changed as well). * would fail for files that contained lines longer than 8kB. * Some junit formatters incorrectly assumed that all testcases would inherit from junit.framework.TestCase. * dropped the first characters from Mac files. Other changes: -------------- * New filter readers: ClassConstants, ExpandProperties, HeadFilter, LineContains, LineContainsRegExp, PrefixLines, ReplaceTokens, StripJavaComments, StripLineBreaks, StripLineComments, TabsToSpaces, TailFilter. * , , , support FilterChains of FilterReaders. * New task to load contents of file as Ant properties. * Users can control what and must do when duplicate files are found. A new element allows for multiple zip files to be merged into the archive. In addition, also has another new attribute: filesetmanifest. The existing manifest attribute of now also accepts the name of a jar added through a fileset. * gzip now checks that the zipfile is older than the source file before rebuilding the zipfile. * New task to load a whole file into a property * New task to list your current properties to the screen or a file. * A new combined email task, which replaces the old and tasks, has been added. The task, and old SendEmail and MimeMail classes have been deprecated. * TarFileset takes in three new attributes - fullpath, prefix and preserveLeadingSlashes. * attempts to rename the directory, if everything inside it is included, before performing file-by-file moves. This attempt will be done only if filtering is off and if mappers are not used. This is a performance improvement and there is no change otherwise in the funtionality of this task. * Exec task has extra attribute "resultproperty" to get the return code into a property. * Exec task prints a message when a timed out process is killed. * Added optional attributes - name, arch and version to * Unjar, Untar, Unwar and Unzip now support patternsets to select files from an archive for extraction. Filesets may be used to select archived files for unarchival. * Javac task allows debug levels to be specified. Debug levels will have an effect only when the modern compiler or the classic compiler (version 1.2 and higher) is used and debugging is enabled. * Mail task allows specification of port number. * Added support for specifying CVS_RSH in the task * New tasks bzip2 and bunzip2 to pack and unpack files using the BZip2 alogrithm, replaceregexp, checksum, translate, waitfor, input, manifest * The attributes zipfile, jarfile, warfile and earfile (from the Zip, Jar, War and Ear tasks) have been deprecated and superseded by a new attribute "destfile". * Added a new condition that test for the existence of a property to the condition task. * Added new conditions , , , , . * Ant's testcases require JUnit 3.7 or above as they now use the new assertTrue method instead of assert. * and will now emit a warning if a task/type of the given name already exists. * A new revision of VAJ tasks: The most important new feature is the ability to execute VAJ tasks from the command line by exploiting the Remote Tool Access feature of VAJ. * Improved support for Novell NetWare. * Added an optional encoding attribute to * has a new attribute relative that allows users to pass the filenames as relative instead of absolute paths on the command line. * References can now be copied into the child build by and using nested elements or the new inheritRefs attribute. * now supports builds to fail based on conditions via if and unless attributes. * Ant now comes with two new BuildLogger implementations - one that can send emails containing a log of the build process (MailLogger); the other that colorizes the output based on message levels using ANSI color code escape sequences (AnsiColorLogger). * A "package" mapper type has been added to allow package directory names replaced with the dotted form. * you can now specify environment variables in the and tasks if the fork attribute has been set to true. * -propertyfile command-line option has been added to load an entire property file just as -D properties are declared (as user properties). -D properties take precedence over -propertyfile specified ones. * You can now set an ANT_ARGS environment variable to hold arguments you always want passed to the 'ant' command -- for example, if you always want to use a different logger or the -find flag. * now supports a new "prefix" attribute to prefix properties set. * you can now specify the -sourcepath for explicitly. * now supports a new "listfiles" attribute to list the source files it's handing off to the compiler. * The compiler implementation for javac can now be chosen on a task by task basis. Use the new compiler attribute of to override the build.compiler property. * 's now has a 'unit' attribute to specify the increment/decrement unit on date operations. * now supports a 'prefix' attribute when loading from a file or resource. * In Ant 1.4 a feature has been added to the task that would add ant.jar, optional.jar and junit.jar implicitly to the classpath - this feature can now be disabled by setting the new includeantruntime attribute to false. *