1.one or more constraints have not been satisfied
maven项目倒入后problem提示:one or more constraints have not been satisfied。
(1)、有可能是你的jdk版的过低了。如下
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
你的pom.xml文件里的maven-compiler-plugin设置编译是1.6 ,但项目中的编译可能是1.7的,所有统一一下。
(2)、在你的pom.xml文件下没有添加:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
这句话所导致的,添加即可。
在工程目录下有一个.settings文件夹,打开org.eclipse.wst.common.project.facet.core.xml做如下修改:
<installed facet="jst.web" version="2.5"/>(可以根据jdk的版本修改为相对性的jst.web版本)