如何从 GWT 插件中删除 Eclipse 中的 "The web.xml file does not exist" 错误?
How to get rid of "The web.xml file does not exist" error in Eclipse from GWT Plugin?
我在一个项目中使用 Eclipse 开发我的 REST
服务器和 GWT
客户端。为了构建这个项目,我使用 Maven
。服务器端代码是在 Spring Framework
中开发的,我使用 Java
而不是 XML
文件配置的所有内容,所以我没有任何 web.xml
文件。
要编译项目,我在 maven pom.xml
中有如下特殊条目:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
应用程序(Spring 服务器端和 GWT 客户端)编译并按预期工作。没有问题,除了 Eclipse,它指出我没有 web.xml
文件。这是整个 Eclipse 错误信息:
Description | Resource | Path | Location | Type
The web.xml file does not exist | WEB-INF | /cms/src/main/webapp | Unknown | Google Web App Problem
如您所见,错误来自 GWT Eclipse 插件。但是这个插件不知道我只为客户端使用GWT,它不应该向我报告那个错误。
我想知道是否可以以及如何将其关闭。
要关闭此检查:
(在 Eclipse 中)
Window -> 首选项 -> Google -> Errors/Warnings -> 项目结构和 SDK -> 缺少 web.xml
我在一个项目中使用 Eclipse 开发我的 REST
服务器和 GWT
客户端。为了构建这个项目,我使用 Maven
。服务器端代码是在 Spring Framework
中开发的,我使用 Java
而不是 XML
文件配置的所有内容,所以我没有任何 web.xml
文件。
要编译项目,我在 maven pom.xml
中有如下特殊条目:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
应用程序(Spring 服务器端和 GWT 客户端)编译并按预期工作。没有问题,除了 Eclipse,它指出我没有 web.xml
文件。这是整个 Eclipse 错误信息:
Description | Resource | Path | Location | Type
The web.xml file does not exist | WEB-INF | /cms/src/main/webapp | Unknown | Google Web App Problem
如您所见,错误来自 GWT Eclipse 插件。但是这个插件不知道我只为客户端使用GWT,它不应该向我报告那个错误。
我想知道是否可以以及如何将其关闭。
要关闭此检查: (在 Eclipse 中) Window -> 首选项 -> Google -> Errors/Warnings -> 项目结构和 SDK -> 缺少 web.xml