解决eclipse+MAVEN提示One or more constraints have not been satisfied.的问题

来源:互联网 发布:公司网络维护外包 编辑:程序博客网 时间:2024/06/06 01:27

别人有不如自己有,原位置:http://www.cnblogs.com/huige-you/p/4195174.html#undefined

应用版本:eclipse luna4.4.1

JDK:1.8

Maven:3.2.5

问题现象:

1、编译工程后总该是显示下面两个错误:

  One or more constraints have not been satisfied.

      Deployment Assembly跟java版本不匹配

 

解决方案:

在pom.xml中添加下面内容即可,同时也可以解决Maven->update project默认jdk的问题


<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


0 0
原创粉丝点击