Generating Ant scripts from the command line

Ant scripts are typically generated using the Plug-in Development Environment (PDE), but it is also possible to generate them by hand or from other scripts. 
Indeed PDE exposes Ant tasks to generate the various build scripts. Build script generation facilities reside in the following tasks.  Arguments are also listed for each task.


<eclipse.fetch elements="bundle@org.eclipse.osgi"
configInfo="win32,win32,x86 & linux, motif, x86"

<eclipse.buildScript elements="bundle@org.eclipse.osgi"
archivesFormat="macosx, carbon, ppc - tar"/>

Directory file format

Directory files are used to indicate where the plug-ins and features can be obtained, as well as their versions. It is a Java property file whose keys are always of the form type@id[,version] but where the value is open ended. When using map files to fetch your elements, the directory file is a concatenation of all the map files, for more details on map files see Fetching From Repositories.

Using the targets

The tasks previously described only work if Eclipse is running. In the particular scenario of executing Ant scripts using Eclipse tasks,the scripts must be run using the Eclipse Ant Runner application. The command line for this particular case is the following:

  java -jar plugins/org.eclipse.equinox.launcher_<version>.jar -application org.eclipse.ant.core.antRunner -buildfile build.xml

Note that the parameters appearing after the application are the parameters that are passed to Ant.