pluginOrganizer

The pluginOrganizer task takes a source directory of plug-in and feature directories and moves them to a target directory with plug-in and feature subdirectories. If the plug-in and feature subdirectories do not exist in the target, they are created. This is the directory structure that Eclipse pdebuild requires.

A directory is considered a feature directory if it contains a feature.xml file. All other directories are considered plug-in directories regardless of whether or not they contain a plugin.xml or manifest.mf file.

If the target plug-in and feature directories already exist, the move might not succeed and no error is provided.

The table below describes pluginOrganizer task attributes.

Attribute Description Required

sourceDirectory

For the pluginOrganizer task, the source directory to use. It is assumed to have plugin and feature directories.

Yes

targetDirectory

The directory to move content to.

Yes

Example

<property name="pluginOrganizerSrc"
		          value="${java.io.tmpdir}/toolkittest/src" />
<property name="pluginOrganizerTarget"
		          value="${java.io.tmpdir}/toolkittest/target" />

<touch file="${pluginOrganizerSrc}/plugin/plugin.xml" mkdirs="true" />
<touch file="${pluginOrganizerSrc}/feature/feature.xml" mkdirs="true" />

<pluginOrganizer sourceDirectory="${pluginOrganizerSrc}"
		                 targetDirectory="${pluginOrganizerTarget}" />

<available file="${pluginOrganizerTarget}/plugins"
		           property="pluginsExists" />

<fail message="Did not find plugins directory at expected location: ${pluginOrganizerTarget}/plugins"
		      unless="pluginsExists" />

<available file="${pluginOrganizerTarget}/features"
		           property="featuresExists" />

<fail message="Did not find features directory at expected location: ${pluginOrganizerTarget}/features"
		      unless="featuresExists />"

Feedback