• 1 reply
  • Latest Post - ‏2012-04-23T15:58:57Z by mattia
14225 Posts

Pinned topic Headless plugin build with Rational

‏2012-04-19T14:01:28Z |

I try to execute a headless build for my eclipse plugin. I created a folder structure like this:

- build_plugin build.xml - builder ( - builderDirectory - features (contains my feature project) - plugins (contains all my plugin projects)


<?xml version=
"1.0" encoding=
"UTF-8"?> <project name=
"proj" default=
"run-java"> <target name=
"run-java"> <java jar=
"C:/IBM/SDP/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar" failonerror=
"true" fork=
"true" jvm=
"C:/IBM/SDP/jdk/bin/java" jvmversion=
"1.6" maxmemory=
"1024m"> <arg line=
"-nosplash -application org.eclipse.ant.core.antRunner -buildfile 'C:/Program Files/IBM/IBMIMShared/plugins/org.eclipse.pde.build_3.6.0.v20100603/scripts/build.xml' -data C:\workspace -DbaseLocation='C:/Program Files/IBM/IBMIMShared' -Dbuilder=C:/workspace/build_plugin/builder -DbuildDirectory=builderDirectory"/> </java> </target> </project>

Running the script produces the following error:

C:\Program Files\IBM\IBMIMShared\plugins\org.eclipse.pde.build_3.6.0.v20100603\scripts\genericTargets.xml:107: Processing inclusion from feature Bundle FooBar_Core_1.0.0.201204191345 failed to resolve.: Missing required plug-in org.eclipse.ui.ide_3.6.0. Missing required plug-in org.eclipse.ui.navigator.resources_0.0.0

The parameter -DbaseLocation should be a path to an eclipse location with pre-built plugins and features directories. Unfortunatly my eclipse (RTC) does not contain these folders. I found them under .../IBMIMShared and set the these path for the -DbaseLocation parameter but still get the same error. Any idea?

Updated on 2012-04-23T15:58:57Z at 2012-04-23T15:58:57Z by mattia
  • mattia
    38 Posts

    Re: Headless plugin build with Rational


    It seems to me as if you are trying to use standard Apache Ant to run your script with the build.xml scripts which are auto-generated by the Eclipse workbench.

    If you want to use Rational Application Developer to perform the headless build of your project, then you should use the Ant runner provided with the product and create your own build.xml script by making use of Rational Application Developer's Ant tasks.

    For example, lets say you have created a plugin in your workspace called "com.example.plugin" and you want to do a headless build of it by using the Rational Application Developer headless tools.

    Create your build.xml script:
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="proj" default="build">
    <target name="build">

    <!-- Ant task to import your project into your headless workspace -->
    <projectImport projectName="com.example.plugin" projectLocation="${basedir}/om.example.plugin" />

    <!-- Ant task used to perform a full workspace build/compile -->
    <workspaceBuild buildType="full" />
    Note that the workspaceBuild call invokes the same Eclipse JDT build/compile that is used by workbench; it is the same as when user selects Project > Build All from the product menu.

    Open up a command prompt and create your "headless" workspace
    • Create a temporary directory on your file system to serve as the "headless" workspace (for example, C:/headless/workspace)
    • Set the %WORKSPACE% environmental variable:
    * In Windows type "set workspace=C:/headless/workspace"
    * In UXIX based OSs type "export workspace=/home/headless/workspace"

    Use the Rational Application Developer Ant runner to invoke the headless build:

    Change directory to point to where the runAnt product entry point is located. This will be something of the type: "%RAD_HOME%/bin", where %RAD_HOME% is the location of the Rational Application Developer product installation.
    Invoke the headless build:
    * On Windows type "runAnt.bat -buildfile build.xml"
    * On Linux type " -buildfile build.xml"
    Moreover, you can take a look at the samples we distribute with the product, which are used to demonstrate its headless tools capabilities.

    Performing headless builds with the Rational Application Developer:
    General Ant tasks: