解決eclipse+MAVEN提示One or more constraints have not been satisfied.的問題

應用版本: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
複製代碼
相關文章
相關標籤/搜索