Ant4Eclipse - 在buildJdtProject任务上排除一些源文件夹

时间:2011-12-12 15:39:05

标签: java ant compilation ant4eclipse

我想知道Ant4Eclipse是否可以使用buildJdtProject任务排除某些文件夹或编译文件。

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

致以最诚挚的问候,

Florent的

1 个答案:

答案 0 :(得分:1)

使用工作区定义并在那里排除您的文件夹。

<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>