【问题标题】:Eclipse Luna ant editor gives error when I add includeAntRuntime attributeEclipse Luna ant 编辑器在我添加 includeAntRuntime 属性时出错
【发布时间】:2016-06-25 14:34:52
【问题描述】:

我正在运行 eclipse luna(面向 Java 开发人员的 Eclipse IDE,版本:Luna Service Release 1a (4.4.1),内部版本 ID:20150109-0600)。

当编译目标运行时,它会给我一个关于缺少 includeAntRuntime 属性的警告。因此,按照 ant 文档的建议,我添加了将其设置为 false 的属性。编辑器用红色为整个目标元素下划线,并说 includeAntRuntime 属性是意外的。

<target name="compile" depends="init" includeAntRuntime="false" >
    <javac srcdir="${src}" destdir="${build.classes}" classpathref="compile.classpath"/>
</target>

我发现 Eclipse 使用的是 ant 1.9.2,而我使用的是 ant 1.9.4。我使用 Window>Preferences>Ant>Runtime 对话框将 Ant 主页更改为指向 1.9.4。

我重新启动了 Eclipse,它没有任何区别。我仍然收到同样的警告。我怎样才能克服这个错误?

【问题讨论】:

    标签: eclipse ant


    【解决方案1】:

    includeAntRuntimejavac 任务的属性,而不是target

    <target name="compile" depends="init" >
        <javac includeAntRuntime="false" srcdir="${src}" destdir="${build.classes}" classpathref="compile.classpath"/>
    </target>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-19
      • 2014-12-10
      • 2015-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-31
      • 2010-11-10
      相关资源
      最近更新 更多