如何在 Eclipse IDE 中快速进行 Web 应用程序项目验证?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13945577/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can to make a web app project validation fast in eclipse IDE?
提问by SRy
While I am doing Project-->cleanto web application in eclipse, validation of XHTML files is very slow.It's taking around 20 minutes to complete the validation.I have 54 XHTML files in my project.
当我在 Eclipse 中执行Project-->cleanto web application 时,XHTML 文件的验证非常慢。完成验证需要大约 20 分钟。我的项目中有 54 个 XHTML 文件。
I unchecked all the entires in window--> preferences-->validations.It's building very fast but I don't know it's a proper way to bypass validations.I am using Eclipse Indigo version.How can I make eclipse to complete validation fast?
我取消选中window-->preferences-->validations 中的所有内容。它的构建速度非常快,但我不知道这是绕过验证的正确方法。我使用的是 Eclipse Indigo 版本。如何让 eclipse 快速完成验证?
回答by Isaac
20 minutes to complete validation of 54 XHTML files is certainly problematic. Re-enable all validators, and run Project -> Clean. As Eclipse is re-validating the files, take a few core dumps of Eclipse's JVM; that might shed a light on where, exactly, things are lagging.
20 分钟完成 54 个 XHTML 文件的验证肯定是有问题的。重新启用所有验证器,并运行 Project -> Clean。由于 Eclipse 正在重新验证文件,因此获取 Eclipse JVM 的一些核心转储;这可能会揭示事情到底在哪里滞后。
My bet is that the validators are trying to access external resources during validations, for example - to download XML schema files or DTD's. If your XHTML files contain references to external resources like those, it is possible that they are the reason for the lag. You could download such DTD's and Schemas, and use Eclipse's XML Catalogto bind DTD/Schema references to physical files on your machine (instead of fetching them online).
我敢打赌,验证器会在验证期间尝试访问外部资源,例如 - 下载 XML 模式文件或 DTD。如果您的 XHTML 文件包含对此类外部资源的引用,则它们可能是导致延迟的原因。您可以下载此类 DTD 和 Schema,并使用 Eclipse 的XML Catalog将 DTD/Schema 引用绑定到您机器上的物理文件(而不是在线获取它们)。
That's just one theory. To know for sure, though, you'll have to issue core dumps of Eclipse's JVM and look closer.
这只是一种理论。不过,要确定的是,您必须发布 Eclipse JVM 的核心转储并仔细观察。