General Projects

A general project is the most simple project type. It contains of a name, can contain natures and builders (in fact most simple projects don't have them since then they are not "general" anymore).

Project references

A General project can specify dependencies to other projects (even to projects of other types) (Project properties -> Project references). Note that this kind of projects reference differs from the JDT project references where you specify dependencies via the classpath. When you ask Ant4Eclipse for the dependency graph of your projecfts you can choose which type of dependencies you want to resolve.

Ant4eclipse' tasks that work even with General project are organized in the "platform" layer. Since all Eclipse project types "inherit" from General project, all tasks defined in the platform layer can be used with any other project type.

Accessing project informations

Retrieving the project directory

The ant task'getProjectDirectory'

Example usage:

<pre>
&lt;ant4eclipse:getProjectDirectory workspacedirectory=&quot;${workspace}&quot;
                                 projectname=&quot;simple.linked.project&quot;
	                         property=&quot;test&quot; /&gt;
</pre>

Checking a project for a specific nature

The ant condition 'hasNature'

Example usage:

<pre>
&lt;antcontrib:if&gt;
    &lt;ant4eclipse:hasNature workspacedirectory=&quot;${workspace}&quot;
                           projectname=&quot;simple.java.project&quot;
                           nature=&quot;org.eclipse.jdt.core.javanature&quot; /&gt;
  &lt;antcontrib:then&gt;
    ...
  &lt;/antcontrib:then&gt;
&lt;/antcontrib:if&gt;
</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>
&lt;antcontrib:if&gt;
  &lt;ant4eclipse:hasBuildCommand workspacedirectory=&quot;${workspace}&quot;
                               projectname=&quot;simple.java.project&quot;
                               buildcommand=&quot;org.eclipse.jdt.core.javabuilder&quot; /&gt;
  &lt;antcontrib:then&gt;
    ...
  &lt;/antcontrib:then&gt;
&lt;/antcontrib:if&gt;
</pre>

Iterating over build commands

executeBuildCommands

Example usage:

<pre>
&lt;ant4eclipse:executeBuildCommands workspacedirectory=&quot;${workspace}&quot;
			          projectname=&quot;simple.java.project&quot;&gt;
 
	&lt;org.eclipse.jdt.core.javabuilder&gt;
		...
	&lt;/org.eclipse.jdt.core.javabuilder&gt;
 
&lt;/ant4eclipse:executeBuildCommands&gt;
</pre>

Team Project Sets