Ant tasks for headless build

Ant tasks are required to create an Ant script that is to be used in a headless EGL build. Besides the Ant tasks defined by Eclipse, Rational® Application Developer, and the ant-contrib library, Rational Business Developer also provide several Ant tasks for your use.

An example of the build script file contains the following sections. You can also define your own build file according to your environment.

Property setting
This section contains general property settings.
Initialization
This section includes the workspace initialization such as creating server runtime, setting up workspace preference and so on.
Tip:
  • To get all supported server types in current workspace, use the listServerTypes Ant task that is defined by Rational Application Developer .
  • To get all supported preferences, first export the Eclipse preferences from your workspace to an Eclipse .EPF archive. To do this, open the Rational Business Developer workspace and click File > Export > General > Preference. After that, inspect the export file to find out the names of the preferences, the preference IDs, and values for the workspace and then use them properly in the WorkspacePreferencesSet Ant task that is defined by Rational Application Developer.
Project import
In this section, loop through all directories in the workspace folder and use the projectImport Ant task to import projects into the workspace.
Default target
In this section, call the workspaceBuild Ant task to do an overall build. Then loop through all the projects. If an Ant script file is found in the build folder, run the build file.

Feedback