Solve the problem that maven cannot be upgraded to web 3.0 or jdk due to the update rollback error, mavenjdk
The first problem is solved because the version number does not match the configuration file. The solution is under the project. setting directory, modify org. eclipse. wst. common. project. facet. core. the version number in the xml file, for example:
You also need to modify the web. xml version.
2.3: <! DOCTYPE web-app PUBLIC "-// Sun Microsystems, Inc. // DTD Web Application 2.3 //" 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/javaee"> 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 version = "3.0" xmlns = "http://java.sun.com/xml/ns/javaee" 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_3_0.xsd">
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 needs to be matched, so the second problem may occur.
The second problem is solved through the configuration file. Add the following configuration under the <build> directory of the pom. xml file <plugins>,
In this way, the above two problems can be solved.
Don't ask me who I am, please call me a red scarf
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.