应用版本:eclipse luna4.4.1java
JDK:1.8eclipse
Maven:3.2.5maven
问题现象:spa
一、编译工程后总该是显示下面两个错误:code
One or more constraints have not been satisfied.xml
Deployment Assembly跟java版本不匹配blog
解决方案:ip
在pom.xml中添加下面内容便可,同时也能够解决Maven->update project默认jdk的问题get
<profiles> <profile> <id>jdk-1.8</id> <!-- 另一种激活方式 --> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile> </prof