Ant scripts are typically generated using the PDE.
PDE core classes can also be used from the command line to generate build scripts by hand. This is not typical, but for specialized automated builds written in Java, you can use the generation classes directly to drive the build process.
Ant script generation facilities reside in the following classes. Command line arguments are also listed for each generator.
-install directoryName - specifies the root directory of the target platform
-plugins pluginPath - optional, specifies base directory for plug-ins
-plugin pluginId - specifies the id of a plug-in to generate; any number of these may be specified
-dev classPathEntries - optional, sets the additional development
model class path entries
-install directoryName - specifies the root directory of the target platform
-plugins fragmentPath - optional, specifies base directory for fragments
-fragment fragmentId - specifies the id of a fragment to generate; any number of these may be specified
-dev classPathEntries - optional, sets the additional development
model class path entries
-install directoryName - specifies the root directory of the target platform
-nochildren - optional, specifies that script generation for contained plug-ins and fragments should not be invoked
-component - the id of the component to generate
-install directoryName - specifies the root directory of the target platform
-nochildren - optional, specifies that script generation for contained components should not be invoked
-configuration - the id of the configuration to generate