关于maven一updateProject项目的jdk就变成1.5或者时1.6的

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_37351768/article/details/83987363

一、在pom.xml中的<build><plugins><plugin>下加入<configconfiguration><source>1.7</source><target>1.7</target>这两个配置就可以了

 二、修改maven的默认jdk配置,找到maven的conf\setting.xml(maven库所在)文件中找到jdk配置的地方,
        <profile>     
        <id>jdk1.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>

猜你喜欢

转载自blog.csdn.net/qq_37351768/article/details/83987363