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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决eclipse+MAVEN提示One or more constraints have not been satisfied 的问题相关的知识,希望对你有一定的参考价值。

问题现象:

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

  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>

 

以上是关于解决eclipse+MAVEN提示One or more constraints have not been satisfied 的问题的主要内容,如果未能解决你的问题,请参考以下文章