Skip to Content

<executePluginLibrary>

Scope: PDE projects

Description

The executePluginLibrary allows you to iterate over the source and output entries of plug-in libraries defined in the build.properties file of a PDE project.

Arguments

The executePluginLibrary task provides the following arguments:

Argument Description Required
workspaceDirectory Absolute path of the workspace directory Either 'workspaceDirectory' or 'workspaceId' has to be specified
workspaceId The identifier of a defined workspace (see <workspaceDefinition>) Either 'workspaceDirectory' or 'workspaceId' has to be specified
projectName Name of the (PDE) eclipse project yes
libraryName Name of library yes
pathSeparator The system-dependent path-separator character. This character is used to separate filenames in a sequence of files. no (default: On UNIX systems, this character is ':'; on Microsoft Windows systems it is ';')
dirSeparator The system-dependent default name-separator character. no (default: On UNIX systems the value of this field is '/'; on Microsoft Windows systems it is '\')
prefix The prefix for all scoped references and properties. no (default: executeJdtProject)

Nested Elements

To iterate over source or output entries specified in the build.properties file, you can define one or more nested elements. Those elements can contain several task calls, similar to an ant target element. The following elements are defined:

  • forEachSourceDirectory: executed for each source directory
  • forEachOutputDirectory: executed for each output directory
  • ForLibrary: executed once for the library

Scoped Properties

Several properties and references are "passed in", so you can access them within the forEachSourceDirectory, forEachOutputDirectory
or ForLibrary elements. You can access the following scoped properties:

Property Availability Description
<prefix>.library.name all elements The name of the current library.
<prefix>.library.isSelf all elements true if this is the 'self' library, false otherwise.
<prefix>.source.directories all elements The source directories (only set if the project contains source directories)
<prefix>.source.directory forEachSourceDirectory The absolute path of the current source directory.
<prefix>.source.directory.name forEachSourceDirectory The name of the current source directory.
<prefix>.output.directory forEachOutputDirectory The absolute path of the current ouput directory.
<prefix>.output.directory.name forEachOutputDirectory The name of the current ouput directory.
<prefix>.project.name all elements The name of the project
<prefix>.project.directory all elements Absolute path of the project directory
<prefix>.<project nature name> all elements true (this property is set for each project nature the project contains)

Example usage

The following example shows the usage of the executePluginProject task:

<ant4eclipse:executePluginLibrary workspace="${workspaceDirectory}"
		                  projectname="${project.name}"
		                  libraryname="${library.name}">
 
  <!-- execute for each output directory -->
  <ant4eclipse:forEachOutputDirectory>
    ...
  </ant4eclipse:forEachOutputDirectory>
 
  <!-- execute for each source directory -->
  <ant4eclipse:forEachSourceDirectory>
    ...
  </ant4eclipse:forEachSourceDirectory>
 
</ant4eclipse:executePluginLibrary>