maven通过pom文件设置JDK1.8进行编译
程序员文章站
2022-06-05 13:50:25
...
修改pom文件,添加properties设置
<properties>
<!-- Build args -->
<argline>-Xms512m -Xmx512m</argline>
<skip_maven_deploy>false</skip_maven_deploy>
<updateReleaseInfo>true</updateReleaseInfo>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<maven.test.skip>true</maven.test.skip>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
修改pom文件,添加plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
上一篇: Spring 04 AOP
下一篇: Java 注解深入理解