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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.