在IntelliJ IDEA中,Maven会生成一个项目,并出现以下警告消息?
Warning:java: source value 1.5 is obsolete and will be removed in a future release
Warning:java: target value 1.5 is obsolete and will be removed in a future release
要修复它,请添加maven-compiler-plugin
插件。
pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
参考文献
翻译自: https://mkyong.com/maven/maven-source-value-1-5-is-obsolete-and-will-be-removed-in-a-future-release/