Skip to Content

<userLibraries>

Scope: JDT projects

Description

The userLibraries type allows you to define pathes from an eclipse user librariies configuration. This is necessary if you use user libraries in a class path that must be resolved by ant4eclipse.

This type reads an exported user libraries definition file and creates an appropriate path instance for each defined library, containing all pathes of the library. The created path instances gets an id assigned that follows the naming schema 'org.eclipse.jdt.USER_LIBRARY/name of the library'.

To use this type, you first have to export the userdefined libraries from eclipse: to do so, use the Export..."-Feature in the preference dialog ("Window->Preferences...", then "Java->Build Path->User Libraries"). The exported file can easily included in your buildfile by using this type.

This way these entries can be resolved and used by the other Ant4Eclipse tasks.

Arguments

The userLibraries datatype provides the following arguments:

Argument Description Required
userlibraries Location of an eclipse userlibraries export file. yes

Example usage

To import user libraries file 'myUserLibraries.xml' that has been exported by eclipse previously:

<ant4eclipse:userLibraries userlibraries="${basedir}/../myUserLibraries.xml"/>