Changes from Ant 1.4.1 to current CVS version ============================================== Changes that could break older environments: -------------------------------------------- * Important: Single $ signs are no longer silently stripped! Before you panic that we have broken all your build files, we have kept the old "$$" -> "$" behaviour. So only build files which accidentally had a $ sign in a string that was being silently stripped may break. We added this fix to stop newbie confusion; if you want to write a build file which works on ant versions 1.4.1 or earlier, stay with the double $$ sign rule. * Shipped XML parser is now Xerces 2.0.1 along with the XML Parser APIs. XML Parser APIs is a separate jar that contains the necessary JAXP/DOM/SAX classes. * was fixed to expand properties inside nested and elements; before this only happened when you assigned the text to the string attribute. If you had $ signs in the string, they may need escaping. * 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. * The -projecthelp flag now only prints out targets that include the 'description' attribute, unless the -verbose or -debug flag is included on the Ant command line. * Ant's testcases now require JUnit 3.7 or above, as they now use the new assertTrue method instead of assert. * If the 'output' attribute of is set to a simple filename or a relative path, the file is created relative to ${basedir}, not ${user.dir}. * The default value for build.compiler is now javac1.x with x depending on the JDK that is running Ant instead of classic/modern. Fixed bugs: ----------- * A bug existed that prevented generated log files from being deleted as part of the build process itself. This has now been fixed. * 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: -------------- * Selector Elements now provide a way to create filesets based on sophisticated selection criteria. * Gzip and Bzip2 files can now be constructed in the fly when using the tar task without having to create the intermediate tar file on disk. The Untar task can also untar GZip and BZip2 files on the fly without creating the intermediate tar file. * New optional type, added. * now allows control over which additional classes and interfaces are added to the generated EJB jars. A new attribute "dependency" can be defines which classes are added. The addition of classes now uses the Jakarta-BCEL library rather than reflection, meaning bean classes are no longer loaded into Ant's JVM. * has a new attribute named ignoreSystemClasses. * New task generates an XML report of changes that occur on CVS repository. * 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, with nested elements. * New task to load a whole file into a property. * New task to list your current properties to the screen or a file. * New tasks and to pack and unpack files using the BZip2 alogrithm. * New tasks , , , , , , , , , , , . * A new combined task, which replaces the old and tasks, has been added. The task, and old SendEmail and MimeMail classes have been deprecated. * Mail task allows specification of port number. * 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. * 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 the task. * 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. * Added support for specifying CVS_RSH in the task * 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 new conditions , , , , , . * 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), and one 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 can now be chosen on a task by task basis. The new "compiler" attribute of can be used to override the value of the build.compiler property, if set. * has a new nested element, , which allows you to specify additional args for the specific compiler you're using. * 's "source" attribute is now enabled for jikes as well. * '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. *