【发布时间】:2017-03-17 13:13:53
【问题描述】:
我使用 maven simple webapp 原型创建了一个 webapp,然后添加了以下依赖项:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
我还更改了web.xml 文件以使用版本 3.1:
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
我将 java 编译器版本更改为 1.8。 Eclipse 现在抱怨:
Cannot change version of project facet Dynamic Web Module to 3.1.
One or more constraints have not been satisfied.
知道如何消除此错误吗?
【问题讨论】:
标签: eclipse maven servlet-3.1