Targets, macros, and built-ins

Inside the project tag, we're defining a number of target nodes and one macro node. The target nodes define tasks that we can run with the Ant runtime. For instance, we can run ant checkoutFromGit to pull our code and metadata from a git repository. Similarly, this build.xml file defines: retrieve, cleanSourceDirectory, deploy, retrieveAndDeploy, and checkoutFromGitAndDeploy. Any of these can be specified on the Ant command line to fire off that task. Tasks can have dependencies, and if you look closely at the retrieveAndDeploy task, you'll see that it defines the dependencies on retrieve and deploy. Dependencies are run in the order they're defined in and provide you with an easy way to combine several tasks into ...

Get Mastering Application Development with Force.com 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.