# Project Builder Ant Targets

When creating a new project builder using an Ant build file, one of the key pieces of information to set up and understand is the targets and when they will be executed.

When you create a new Ant buildfile project builder, the default target is set to be run for After a "Clean" and Manual Build and the remaining two kinds; Auto Build and During a "Clean" are set to not be executed. If you want to configure your builder to execute specific targets from your buildfile for specific build kinds then more understanding of what the build kinds are, and more importantly, when they will be executed is required.

The following sections describe each build kind and when it is executed.

### After a "clean"

This build kind is executed after a project has been cleaned via the Project > Clean... command.

After a "Clean" will execute during the next build immediately following the clean regardless of your workspace auto-build settings. If you have workspace auto-build on this will execute automatically following the clean, otherwise you will have to invoke one of the manual build commands; Project > Build Project, Project > Build All or enable Project > Build Automatically.

### Manual Build

This build kind is executed when you have workspace auto-build (Project > Build Automatically) turned off and you invoke a build via the Project > Build Project or Project > Build All (Ctrl+B) command.

There are three exceptions to when Manual Build targets execute:

1. If the build is the first build following a clean (Project > Clean...) then an After a "Clean" build will be executed instead
2. If there are no targets set to run for After a "Clean", then the Manual Build targets will be executed following a clean (Project > Clean...)
3. If there is nothing to be built, i.e. no changes have been made to the project, then Manual Build targets will not be executed

### Auto Build

This build kind is executed when you have workspace auto-build (Project > Build Automatically) turned on and you make changes in your project and save them.

### During a "clean"

This build kind is executed when you invoke a clean build via the (Project > Clean...) command.

During a "Clean" does not depend on the workspace auto-build setting (Project > Build Automatically) as it executes during the clean build, not after, like After a "Clean" or Manual Build.

### Related Tasks

Creating Ant buildfiles
Editing Ant buildfiles
Saving & Reusing Ant options
Running Ant buildfiles
Ant buildfiles as project builders
Executing project builders
External tools
Non-Ant project builders
Stand-alone external tools