Java 无法将project facet动态Web模块的版本更改为3.1
为什么maven坚持在eclipse项目中将我的动态Web模块更改为3.1?我希望它保持在4.0。有没有办法告诉maven我想要Servlet spec 4.0?到目前为止,Maven文档还没有为我提供这个问题的答案 以下是我的pom的部分内容:Java 无法将project facet动态Web模块的版本更改为3.1,java,eclipse,maven,m2eclipse,servlet-4,Java,Eclipse,Maven,M2eclipse,Servlet 4,为什么maven坚持在eclipse项目中将我的动态Web模块更改为3.1?我希望它保持在4.0。有没有办法告诉maven我想要Servlet spec 4.0?到目前为止,Maven文档还没有为我提供这个问题的答案 以下是我的pom的部分内容: org.apache.maven.plugins m2e错误: 我正在使用EclipseOxygen与Java10和Tomcat9。我曾经尝试过关闭并重新打开我的项目,做一些小的更改,然后Maven更新我的项目,删除Maven配置错误,看看它们是
org.apache.maven.plugins
m2e错误:
我正在使用EclipseOxygen与Java10和Tomcat9。我曾经尝试过关闭并重新打开我的项目,做一些小的更改,然后Maven更新我的项目,删除Maven配置错误,看看它们是否在更新后回来(它们回来了),以及其他类似的尝试和错误类型的事情。到目前为止,一切都不起作用 相关错误:
请尝试使用m2e wtp 1.4.0。目前,最新的里程碑版本可从中获得。只需使用:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
id="WebApp_ID" version="4.0">
而不是:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
id="WebApp_ID" version="3.1">
在你的web.xml
标题中。伙计,这太好了。非常感谢+1.
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
id="WebApp_ID" version="4.0">
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
id="WebApp_ID" version="3.1">