January 18, 2009 by Gerd Wuetherich
Scope: All Project Types
Description
Returns the project directory for a given eclipse project. Since ant4eclipse supports the usage of linked projects, it is necessary in some case to resolve the 'real' path of a project.
Arguments
The getProjectDirectory
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 eclipse project | yes |
property | The name of the property that will hold the resolved path | either 'pathId' or 'property' has to be specified |
pathId | The reference id for the path that will be created | either 'pathId' or 'property' has to be specified |
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 '\' ) |
relative | Determines whether the result path should be resolved relative to the given workspace or absolute | no (default: false) |
Example usage
The following example resolves the absolute path of the the project with the name 'simple.java.project':
<ant4eclipse:getProjectDirectory workspacedirectory="${workspace}" projectname="simple.java.project" property="test" />
- Printer-friendly version
- Login to post comments