After last night on Close project, get up today open Project found this problem. Now it's settled.
Emphasize. Before using Eclipse to create a MAVEN project, the Web. xml file default version is 2.3, but I changed it to 3.1, and the specific changes are:
To Tomcat find the Web. XML copy inside of this come on just fine.
Solution:
First: Add the following configuration to Pom.xml.
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <art Ifactid>maven-compiler-plugin</artifactid>
<!--here refers to the version in Web. Xml --<version>3.1</version> <configuration>
<!--here refers to the JDK version used, I am jdk1.8.0_40on the machine, so write 1.8 --<source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins></build& Gt
Second: Modify the configuration in the project's Org.eclipse.wst.common.project.facet.core.xml file: The following 1.8 and 3.1 correspond to the above version
<installed facet= "java" version= "1.8"/> <installed facet= "Jst.web" version= "3.1"/ >
Modify the appropriate configuration
When you are done, right-click the project-->maven-->update projects ... Update the project, then.
Issues with the MAVEN project in Eclipse: Troubleshoot the dynamic Web Module x.x requires Java x.x or newer.