如何告诉 Eclipse 忽略 Ant build.xml 中的错误? [英] How to tell Eclipse to ignore errors in an Ant build.xml?

查看:34
本文介绍了如何告诉 Eclipse 忽略 Ant build.xml 中的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 Maven 构建的 Eclipse 项目,我在 Eclipse 中使用 m2eclipse 插件来支持 Maven.

I have an Eclipse project which is built using Maven, and I'm using the m2eclipse plugin inside Eclipse for it's Maven support.

然而,该项目还包含一个 build.xml,它不用于实际构建项目,而仅用于作为项目开发人员实用程序的脚本功能 - 它不用于构建或打包产品(只是帮助自动化开发人员经常需要调用的一些辅助任务).

However this project also contains a build.xml which is not used for actually building the project, but just for scripting capabilities as a utility for developers on the project - it is not used in building or packaging the product (just helping to automate some side tasks the developers often have to invoke on the side).

每当在 Eclipse 的编辑器中打开此文件时,Eclipse 都会注意到它认为是 build.xml 中缺少一些声明的问题,并开始显示项目的错误(在问题视图中)以及红色 X 项目的图标/标记,以显示存在构建错误.这些甚至不是 build.xml 的真正问题,只是 Eclipse 认为存在的一些问题,因为它无法导入此 build.xml正在使用.项目没有构建"错误,只是 Eclipse(在它的无限智慧中)能够解析用于辅助目的的 build.xml 的错误.

Whenever this file is opened in an editor in Eclipse, Eclipse notices what it thinks is a problem with some missing declarations in the build.xml and begins to display errors for the project (in the Problems view) along with a red X icon/marker for the project to show that there are build errors. These aren't even true problems with the build.xml, just some problems that Eclipse thinks are present because it is not able to import all of the other dependent files this build.xml is using. There are no "build" errors with the project, just errors in what Eclipse (in it's infinite wisdom) is able to parse about a build.xml used for auxiliary purposes.

有什么方法可以让 Eclipse 忽略特定项目中的 build.xml 或 Ant 警告?我是否需要从项目属性的 Builders 选项卡中删除 Java Builder?

Is there any way to tell Eclipse to ignore a build.xml or ignore Ant warnings in a particular project? Do I need to remove the Java Builder from the Builders tab of the project properties?

推荐答案

Window-> Preferences -> Ant -> Editor -> Problems (Tab)
选中忽略所有构建文件问题"

Window-> Preferences -> Ant -> Editor -> Problems (Tab)
check 'Ignore all buildfile problems'

这篇关于如何告诉 Eclipse 忽略 Ant build.xml 中的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆