首页 > 代码库 > 解决eclipse+MAVEN提示One or more constraints have not been satisfied 的问题

解决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 的问题