问题现象:
编译工程后总该是显示下面两个错误:
One or more constraints have not been satisfied.
Deployment Assembly跟java版本不匹配
解决方案:
在pom.xml中添加下面内容,然后Maven->update 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>