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. Fixed bugs: ----------- * 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 subbuilds 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. Other changes: -------------- * 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 a 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. * no supports builds to fail based on conditions via if and unless attributes. * Ant now comes with a BuildLogger implementation that can send emails containing a log of the build process (MailLogger). * A "package" mapper type has been added to allow package directory names replaced with the dotted form. Changes from Ant 1.4 to Ant 1.4.1 =========================================== Fixed bugs: ----------- * 's antfile attribute will now also be considered an absolute path on Windows systems, if it starts with a \ and no drive specifier. * The fullpath attribute of has been ignored if you used the src attribute at the same time. * The manifest file is now always placed as the second entry (after /META-INF) in generated jars. This allows the manifest to be read by JarInputStreams * Fixed bug in depend task which would fail with a NullPointerException if no dependency cache was specified. * sql task now handles REM statements correctly so that lines starying with rem but which are not comments are actually processed. * XMLLogger now uses the task's name rather than the classname * s will now work as expected if the to pattern expands to an absolute pathname. * didn't ignore memory settings in non-fork mode * didn't split the options attribute into several command line arguments correctly. Other changes: -------------- * New source attribute for to enable assertion in JDK 1.4 * XmlLogger and now add an encoding declaration to the XML files they generate. * has a new attribute "casesensitive" to make it match filenames in a case insensitive way (if you set it to false) - by default filesets remain case sensitive. Changes from Ant 1.3 to Ant 1.4 =========================================== Changes that could break older environments: -------------------------------------------- * JUnitReport now uses the xalan redirect extension for multi-output. With Xalan 1.2.2 it forces the use of bsf.jar in the classpath. (Available in the xalan distribution). It is recommended to switch to Xalan 2.x that do not need it. * Zip.setWhenempty() has changed its signature. * is now implemented using a factory. This makes extending rmic to use a new compiler a lot easier but may break custom versions of this task that rely on the old implementation. * several Zip methods have changed their signature as we now use a Zip package of our own that handles Unix permissions for directories. Furthermore will now use the platform's default character encoding for filenames - this is consistent with the command line ZIP tools, but causes problems if you try to open them from within Java and your filenames contain non US-ASCII characters. Use the new encoding attribute of the task and set it to UTF8 to get the old behavior. * The task has been moved to a package of its own. * JUnitResultFormater has two additional methods that must be implemented by custom formatters. * Ant will no longer use the canonical version of a path internally - this may yield different results on filesystems that support symbolic links. * The output generated by the xml formatter for has changed again, it doesn't format the numeric value in the time attribute anymore. * Pattern matching rules have changes slightly, the pattern foo* doesn't match files contained in a directory named foo - use foo/* instead. * will not remove trailing whitespace at the end of lines anymore. * The Classloader usage has been changed for the taskdef, property, available and sql tasks so that it delegates to the parent classloader. This may cause ClassNotFoundExceptions to be thrown if a system class attempts to load a class in the taskdef's classpath (typically factory objects). * Ant now allows multithreading of tasks and the containment of tasks within other tasks. This can break customer listeners which do not expect messages from a task before the previous task has finished. * Ant now installs its own ouput stream into System.out to route output to the task currently executing on the current thread. This also means that all output is now routed as Ant message events. Customer listeners and loggers should not call System.out at any time. This has always been true but such usage now will cause problems due to possible recursion. * Invalid manifest files will now cause build failures in the task. * Ant Introspection now looks for methods with method names starting with addConfigured. When called these methods are passed an argument after it has been configured from the build file. Custom tasks supporting nested elements starting with the name configured will no longer function. * The environment variable JAVACMD that can be used to specify the java executable to Ant's wrapper scripts must not contain additional command line parameters any longer - please use the environment variable ANT_OPTS for such parameters now. * Ant's wrapper scripts now quote the CLASSPATH environment variable, thus supporting classpaths which refer to directories containing spaces. This means that the CLASSPATH environment variable cannot have quotes. Any quotes should be removed. This will not affect the operation of the CLASSPATH environment variable in other contexts. * A delete task like will now remove "somedir" as well, unless there are still files left in it (matched by the default excludes). * The copy task will now fail if the file to be copied is not found. * Ant properties defined in properties files now behave the same way as properties defined in the build file. In particular the $ character needs to be escaped in property values by doubling it to $$. So, to define a property with the value $hello, you need to define it in a properties file as test.prop=$$hello This was not the case in Ant 1.3 Other changes: -------------- * New tasks: ear, p4counter, record, cvspass, vsscheckin, vsscheckout, typedef, sleep, mimemail, set of tasks for Continuus/Synergy, dependset, condition, maudit, mmetrics, jpcoverage, jpcovreport, jpcovmerge * Ant now uses JAXP 1.1 * rmic now supports Kaffe's and Weblogic's version of rmic. * new magic property build.rmic to chose the rmic implementation * will now add empty directories as well * you can now specify a description for * can now work on s * now supports a value attribute * supports nested text * won't override files that are already in the correct format. * now supports REM comments as well as // and -- * now has a nested element following the same idea as 's . * can now handle multiple projects. * now has a "type" attribute you can use in conjunction with the "file" attribute to specify whether the "file" you're looking for is a file or a directory. * New formatter named "brief" * changes * Add support for Borland Application Server to the task using a nested element. * Add support for iPlanet Application Server to the task. Also includes some iPlanet utility tasks * Add support for JBoss Application Server to the task. * Add a naming attribute to control the naming scheme that ejbjar uses to name the generated EJB jars. * Weblogic element now sets the compiler class for EJB 2.0 beans * elements can be specified at the level for building generic beans * elements can now be URLs * Allow the manifest to be specified for the generated jars * The weblogic element now supprts an attribte noEJBC to skip the processing of the jar by ejbc. The ejbc step will then occur at deployment * weblogic will tell ejbc to use Jikes compiler if build.compiler is set to jikes. It can be restored to the default, javac, operation if desired. * Allow the Delimiter to be set in the so that Oracle stored procs may be entered * and can now optionally skip empty filesets. * has a new useexternalfile attribute that makes it use a temporary file for sourcefile and package names - helps to defeat command line length limitations. * Data types like can now be defined inside of s * you can now specify a classpath for