December 29, 2008 by Gerd Wuetherich
Retrieving the project directory
The ant task'getProjectDirectory
'
Example usage:
<pre> <ant4eclipse:getProjectDirectory workspacedirectory="${workspace}" projectname="simple.linked.project" property="test" /> </pre>
Checking a project for a specific nature
The ant condition 'hasNature
'
Example usage:
<pre> <antcontrib:if> <ant4eclipse:hasNature workspacedirectory="${workspace}" projectname="simple.java.project" nature="org.eclipse.jdt.core.javanature" /> <antcontrib:then> ... </antcontrib:then> </antcontrib:if> </pre>
Checking a project for a specific build command
To check whether a given eclipse contains a specific build command or not, you can use ant4eclipse's hasBuildCommand
condition.
Example usage:
<pre> <antcontrib:if> <ant4eclipse:hasBuildCommand workspacedirectory="${workspace}" projectname="simple.java.project" buildcommand="org.eclipse.jdt.core.javabuilder" /> <antcontrib:then> ... </antcontrib:then> </antcontrib:if> </pre>
Iterating over build commands
executeBuildCommands
Example usage:
<pre> <ant4eclipse:executeBuildCommands workspacedirectory="${workspace}" projectname="simple.java.project"> <org.eclipse.jdt.core.javabuilder> ... </org.eclipse.jdt.core.javabuilder> </ant4eclipse:executeBuildCommands> </pre>
- Printer-friendly version
- Login to post comments