O'Reilly logo

Ant: The Definitive Guide by Jesse Tilly, Eric M. Burke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Miscellaneous Task Topics

Being something that changes every six months, Ant is by no means in a perfect state. Some of its behaviors are not always immediately obvious. There are quirks, open issues (read: bugs), and hidden features not in the distributed documentation. The following sections describe items you need to be aware of when writing your own tasks. If you want to live dangerously, implement your task, deploy it, and see what happens. When you have a problem you can’t explain, jump back to this section and see if one of these items help. Some issues, such as System.exit( ), will never go away unless the JVM specification changes. Other problems, such as magic properties, may go away after some new task model implementation finds its way to release in the future. Of course, you can try to avoid all issues in the future by implementing a task test.

Magic Properties

Many moons ago, the javac task came to be. Many people said it was good and many others nodded in agreement. At the time, at least three different compilers were available for the primary Java platforms (Solaris, Linux, and Windows). These compilers were javac (and its different compile modes), IBM’s jikes, and Symantec’s sj. Rather than have the compiler type defined as an attribute of the <javac> element, the developers decided that there should be a global setting, affecting all uses of the javac task. This global setting applies to every occurrence of javac or any related task that derives from the Javac ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required