解决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>

 

posted on 2016-10-10 11:36  狂奔的呙牛  阅读(1257)  评论(0编辑  收藏  举报

导航