我有一个基于代码的mavenized配置Spring 3.2.4 Web应用程序.当我使用Maven/pom.xml构建应用程序时,我得到一个错误,即web.xml丢失.首先,我尝试创建一个空的web.xml.这是项目方面发生变化的时刻(我不知道为什么).它从动态Web模块3.0切换到3.1,这是不可逆转的.如何将其再次更改为Dynamic Web Modules 3.0 ???

另外我无法删除JAX-RS.尝试这样做会导致:
Failed while uninstalling JAX-RS (REST Web Services) 1.0.
org.eclipse.jst.javaee.web.internal.impl.WebAppImpl cannot be cast to org.eclipse.jst.j2ee.webapplication.WebApp
Run Code Online (Sandbox Code Playgroud)
后来我发现我可以通过在pom.xml中插入相应的插件来避免Maven编译错误:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)