The Ant Command Line

We’ve already discussed a few of the Ant command-line switches and arguments, but we need to spend a little time covering all of them. There really aren’t that many, but they can fundamentally change the way Ant works.

The general format of an Ant command line looks like Listing 3.77.

Listing 3.77. General Form of Ant Command Line
ant [options] [target...]
				

Notice that you can specify multiple targets on the command line and they will be executed in the order you gave them. This is optional, and if no targets are given, the default target will be executed.

The options that Ant supports are

  • -help prints a usage message.

  • -version prints the version of Ant and exits.

  • -projecthelp displays the names and descriptions of targets ...

Get Ant Developer’s Handbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.