Maven项目打红叉,且在problem出现如下问题时:
1 Java compiler level does not match the version of the installed Java project facet.SSMDemo
Maven WebUnknownFaceted Project
Problem (Java Version Mismatch)
2、JAX-RS (REST Web Services) 2.0 requires Java 1.7 or newer.SSMDemo
Maven Webline 1Maven Java EE
Configuration Problem
3、One or more constraints have not been satisfied.SSMDemo
Maven Webline 1Maven Java EE
Configuration Problem
解决方法:在pom.xml文件中的<build></build>标签中插入如下内容:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8(系统安装的JDK版本)</source>
<target>1.8(系统安装的JDK版本)</target>
</configuration>
</plugin>
</plugins>
</build>