编译maven项目后报错
One or more constraints have not been satisfied.
可以在pom.xml文件中添加如下配置:
<project>
……
……
……
……
<profiles>
<profile>
<id>jdk-1.7</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>
</profiles>
</project>
同时也可以解决Maven–>update project时默认jdk的问题