Ant4Eclipse - exclude some source folder on buildJdtProject task

122 Views Asked by At

I would like to know if it's possible with Ant4Eclipse to exclude some folders, or files from compilation with the buildJdtProject task.

<buildJdtProject workspaceId="myWorkspace" projectName="@{projectName}" targetLevel="1.6" />

Best regards,

Florent

1

There are 1 best solutions below

0
On BEST ANSWER

Use the workspace definition and exclude your folder there.

<dirset dir="${eclipse.workspace.dir}" id="workspacedirset">
    <!-- exclude your directory-->
    <exclude name="EXCLUDEME"/>
    <!-- include all others -->
    <include name="**"/>
</dirset>
<ant4eclipse:workspaceDefinition id="myworkspace">
    <dirset refid="worspacedirset"/>
</ant4eclipse:workspaceDefinition>