During the configuration of the MAVEN project, the following error was encountered during the deployment to the Tomcat server to run:
1 " "
The reason for the error is that the JDK version referenced by Maven is inconsistent with the version referenced by Tomcat, and the solution is as follows:
1. Modify the JDK version of MAVEN to 1.7:
A) in Maven's setting file, add
Add the following profile elements under the Profiles element in the Setting.xml file <profile> <id>jdk17</id> < Activation> <activeByDefault>true</activeByDefault> <jdk>1.7 </jdk> </activation> <properties> <maven.compiler.source>1.7 </maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion> </ Properties> </profile>
b) Add the following build element to the project's Pom,xml file
<build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid > <artifactId>maven-compiler-plugin</artifactId> <configuration> <source >1.7</source> <target>1.7</target> </configuration> </plugin> </plugins></build>
c) myeclipse->windows->perference-> Find maven-> Modify JDK version (optional)
2. Modify the JDK version of Tomcat:
Myeclipse->window->servers->tomcat->tomcat7.x->jdk-> to 1.7 (same as MAVEN)
Unsupported Major.minor version 51.0 the JDK does not conform to the JDK versions referenced by MAVEN when configuring/running MAVEN Engineering