Skip to Content

<targetPlatform>

Scope: PDE Projects

Description

The targetPlatform type can be used to define a PDE target platform. Target platforms are used when working with plugin and feature projects. They define locations where binary, plugins can be found (e.g. an existing eclipse installation).

A target platform may consist of more than one directory. A directory listed in the targetPlatform type has to be the parent directory of the plugins directory that contains the plugins (e.g. if you would like to include the plugins of your eclipse distribution, you would add "c:/eclipse" (or whereever you've installed Eclipse) as a directory and not "c:/eclipse/plugins").

You can use the target platform within the ant4eclipse tasks by refering to it with the target platform id.

Arguments

The targetPlatform type provides the following arguments:

Argument Description Required
id An id that can be used to reference this platform definition later in your buildfile yes

Nested elements

Each directory you want to include in your platform definition must be added using a location element.

Argument Description Required
dir The directory that should be added to your platform definition. Inside this directory there must be
the plugins directory that contain the plugins
yes

Example usage

The following example creates a target platform defintion that consists of one directory. The defintion can be referenced via it's id 'eclipse-3.5':

<project name="..." default="...">
 
  <ant4eclipse:targetPlatform id="eclipse-3.5">
    <location dir="c:/eclipse-3.5" />
    <location dir="d:/addtionalLocation" />
  </ant4eclipse:targetPlatform> 
 
 </project>