Scenario: The following error was encountered when importing a MAVEN project.
1 Problem description and resolution
When Eclipse Maven developed a JEE project, the compile time encountered the following error :
Descriptionresourcepathlocationtype
Dynamic Web Module 3.1 requires Java 1.7 or newer.bdpline 1Maven java EE Configuration problem
Descriptionresourcepathlocationtype
One or more constraints has not been satisfied.bdpline 1Maven Java EE Configuration problem
But Eclipse has clearly set the compilation level to 1.7:
This is because your Maven compilation level is jdk1.6 or below, and you have imported more than jdk1.7 dependency packages: View the. classpath file for the project under Eclipse's Navigator view:
Workaround:
Use Maven-compiler-plugin to change the MAVEN compilation level to jdk1.7 or more:
<plugin> <groupId>Org.apache.maven.plugins</groupId> <Artifactid>Maven-compiler-plugin</Artifactid> <version>3.1</version> <Configuration> <Source>1.7</Source> <Target>1.7</Target> </Configuration></plugin>
Finally , you can resolve the problem by executing Maven-Update Project.
(EXT) Eclipse Maven compilation error Dynamic Web Module 3.1 requires Java 1.7 or newer solution