The first problem is resolved because the version number does not match the configuration file, and the workaround is to the. Setting directory under the project, modifying the version number in the Org.eclipse.wst.common.project.facet.core.xml file, such as:
Also modify the version of Web. xml
2.3:<! DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.3//en" "Http://java.sun.com/dtd/web-app_2_3. DTD ">
2.4:<web-app id="Webapp_9" version="2.4" xmlns="HTTP://JAVA.SUN.COM/XML/NS/J2EE" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="Http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
2.5:< Web-app xmlns=<a target=" _blank " href=" http://java.sun.com/xml/ns/ Java ee ">http://java.sun.com/xml/ns/javaee</a> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="Http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd " version="2.5">
3.0 : <WEB-APP&NBSP; version= span class= "attribute" style= "margin:0px; padding:0px ">xmlns=" http://java.sun.com/xml/ns/ Java ee " xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "&NBSP;
xsi:schemalocation="/HTTP/ Java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd ">&NBSP;&NBSP;
3.1:<web-app 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 "xmlns= "Http://xmlns.jcp.org/xml/ns/javaee" >
The final JDK version also corresponds, so a second problem may occur.
The second issue is the configuration file resolution, which adds the following configuration to the Pom.xml file <build> directory <plugins>
This will solve the above two problems
Don't ask me who I am, please call me red scarf
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Workaround maven cannot upgrade to Web 3.0 and JDK versions due to update rollback errors