Apache Ant™ is a Java-based build tool that uses XML-based configuration
files to describe build tasks. Rational Business Developer (RBD), is
built on the Eclipse platform, which supports running Ant builds from
the IDE Run as
menus or from a command file.
also supports the ability for plug-ins to contribute IDE build tasks to
Ant using extension points. RBD includes tasks contributed by the Eclipse and Rational Application Developer (RAD) teams that can used to perform a complete
Eclipse project build.
Example: Building and generating an EGL project
example shows how to run an Ant build file to perform a build of an EGL
project from a command file. The build file will:
- Compile the EGL source (.egl) files into EGL intermediate representation (.ir) files
the files if there is a default build descriptor specified for the
associated source file and if the EGL generation preference "Generate
after build" is selected for the workspace.
To run the example:
- setRBDEnvironment.cmd - identifies workspace and RDB jar files for running IDE in headless mode
- runAntInIDE.cmd - launches Eclipse Ant runner in your workspace
- runProjectBuild.cmd - runs runEclipseProjectBuild.xml Ant file in your workspace
- RunEclipseProjectBuild.xml - Ant file: runs Eclipse build on specified project and writes results to the console
2. Edit setRBDEnvironment.cmd and change variable settings as necessary to be correct for you installation of RBD.
Set workspace build preference "Build automatically" off so that only
the project builds explicitly started by the Ant file will run.
Set EGL generation preference "Generate after build" on for each
generator you want to run automatically after the .ir files are built
for the project.
5. In a command prompt window, set
current location to the directory that contains the command files you
unzipped and enter command:
Things to think about
1. The current version of RBD will hang if you attempt to generate programs from more than one project. Avoid this problem by:
- Ensuring workspace build preference "Build automatically" is off so that no extra project builds get triggered in the workspace.
- Building only one EGL source project in each invocation of Ant
If you are generating Java files, you will want to run the Java builder
to compile the generated Java files. A best practice for command file
builds is to use the genProject build option to generate the Java files
into a Java project that is different than the EGL source project. You
could add a step to the Ant file to build the Java project after
building the EGL source project.
More information on Ant and Ant in Eclipse