通过 pom 设置 Maven 通过 JDK 1.8 进行编译

    
        .compiler.target>1.8.compiler.target>
        .compiler.source>1.8.compiler.source>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-compiler-pluginartifactId>
                <version>3.6.1version>
                <configuration>
                    <source>1.8source>
                    <target>1.8target>
                configuration>
            plugin>
        plugins>
    build>

1、How to tell Maven to use Java 8
https://www.mkyong.com/maven/how-to-tell-maven-to-use-java-8/


你可能感兴趣的:(Maven)