This is the wrong time to use maven today.
And then checked on the Internet, the JDK version does not match,
There are several places you can modify
Workaround 1:
The JDK I use is 1.8
Windows-proferences-java–compiler set JDK to 1.8
Windows-proferences-java–installed JREs set JDK to 1.8
Click Item Right button –properties-java Compiler set JDK to 1.8
Click the Item right button –properties-eclipse-project Facets set Java to 1.8
Click the item right key –properties-eclipse-project facets set dynamic Web Module to 3.1 (this is your servlet version of Web.xml configuration)
Click the Item right button –maven-update Project error should be eliminated
If it's still not working, you're in Pom.xml.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
< artifactid>maven-compiler-plugin</artifactid>
<version>2.0.2</version>
< configuration>
<source>1.8</source>
<target>1.8</target>
</ configuration>
</plugin>
</plugins>
So we can solve the mistake.
Workaround 2: Modify the installation directory. modifying JDK versions in Settings.xml in \apache-maven-3.3.9\conf
Adding in the Profiles node
<profile>
<id>jdk-1.8</id>
<activation>
<activebydefault>true</ activebydefault>
<jdk>1.8</jdk>
</activation>
<properties>
< Maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</ Maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
If it's still not working, go to the place where the project is stored. I'm F:\eclipse\workspace\seckill.settings modify org.eclipse.wst.common.project.facet.core.xml this file
<?xml version= "1.0" encoding= "UTF-8"?>
<faceted-project>
<fixed facet= "Wst.jsdt.web"/ >
<installed facet= "Jst.web" version= "3.1"/> <installed facet=
"Wst.jsdt.web" version= "1.0"/ >
<installed facet= "java" version= "1.8"/>
</faceted-project>
Modify installed facet= "Jst.web" version= "3.1"/3.1
Installed facet= "Java" version= "1.8"/> to 1.8
That's OK.