Build the project using maven error Can not change version of project facet Dynamic Web Module to 3.0 Solutions

An error

Here Insert Picture Description

Description	Resource	Path	Location	Type
Cannot change version of project facet Dynamic Web Module to 2.5.	web-test		line 1	Maven Java EE Configuration Problem
One or more constraints have not been satisfied.	web-test		line 1	Maven Java EE Configuration Problem

solution

1. Right-click the project name, open the "Properties" search "Project facets", the "Dynamic Web Module" was changed to 3.0, "Java" was changed to 1.8
Here Insert Picture Description2, open the "org.eclipse under" .settings "in the project directory .wst.common.project.facet.core.xml "file, modify jst.webthe" version "3.0
Here Insert Picture Description

3, open the "web.xml" file in the project "src \ main \ webapp \ WEB-INF", the "version" in the "webapp" tag (usually the second line) was changed to 3.0

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

Note in:

Perform these three steps to resolve the error change

Published 208 original articles · won praise 841 · Views 1.21 million +

Guess you like

Origin blog.csdn.net/baishuiniyaonulia/article/details/95597256