The first beta of Apache Ant 1.7.0 is out.
Ant 1.7 doesn't come with big features that will change the way you do Ant builds like 1.6 did, it is more of a collection of bug fixes plus a set of smaller, yet useful, features.
The mayor new feature is the support for resource collections. Resource collections provide a unification of the existing file collection classes and some non-file "things" you can read from. In particular they
- unify <path>, <fileset>, <filelist> and <dirset> so that <copy> or <apply> (among others) now work on all of those types - use whatever is more appropriate for your use case.
- support set operations and sorting. For example you can now have a union of two <fileset>s, intersect a <path> and a <filelist> or sort a <fileset> by file size.
- Use <zipfileset> or <tarfileset> in many places where only "plain" <fileset>s have been supported before. You can create a tar archive from a zip file by combining the <tar> task with a <zipfileset> for example.
- introduces <url> and CLASSPATH resources as first class resources as well. You can copy things from the CLASSPATH (this includes extracting them from jars) or <gunzip> URLs, fetching and decompressing them on the fly.
The full list of changes is pretty long. My highlights (YMMV):
- <junit> doesn't require junit.jar to be on the CLASSPATH or in ANT_HOME/lib anymore, it will happily work with JUnit on the nested <classpath>.
- <rmic> now properly works on Java 5, there even is support for Mustang's -Xnew argument.
- <junit> supports JUnit 4 out of the box by wrapping JUnit 4 tests in JUnit4TestAdapter internally.
- <get> no longer re-fetches resources that are up-to-date.
- <checksum> supports several different input/output patterns and comes with support for the patterns of the GNU md5sum and BSD's md5 commands.
- <sync> can preserve selected files in the target directory that are not present in the source directory.
As usual you can expect Ant 1.7.0 to be backwards compatible. We tried our best but you might find problems - better give the beta a try, find and report the problems now so that we can fix them prior to the final release 8-).
Even though we've added some initial support for JDK 1.6 and used the Mustang betas to test Ant, there may be problems lurking.
path: /en/Apache/Ant | #