java - Ant4Eclipse - 在 buildJdtProject 任务中排除某些源文件夹

标签 java ant compilation ant4eclipse

我想知道 Ant4Eclipse 是否可以通过 buildJdtProject 任务从编译中排除某些文件夹或文件。

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

最诚挚的问候,

弗洛伦特

最佳答案

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

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

关于java - Ant4Eclipse - 在 buildJdtProject 任务中排除某些源文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8476818/

相关文章:

android - 运行用于自动化构建的JUNIT测试-如何?

ant - 使用 Gradle 时如何执行 OpenJPA Enhancement?

java - jUnit 测试在 Eclipse 中工作,但当我通过 ant 运行它们时失败

c++ - C++中的多重定义错误

linux - 尽管与存档有直接链接,但对任何 libc 符号的 undefined reference

java - 如何在 Tomcat 5.5.x 中部署 EJB 3.1

java - GAE 无法查找 mongodb atlas 实例的 SRV 记录

java - 朱尼特木星 : How can I change a mockito mock behavior cached in a List outside the test class?

c - 关于 C 编译中的括号

java - 从更新的 SQL 数据库刷新 JavaFX 场景?