Warning:java: source value 1.5 is obsolete and will be removed in a future release
或
Warning:java: 源值1.5已过时, 将在未来所有发行版中删除
虽然在eclipse或者idea设置了jdk和编译版本,但是maven默认还是用jdk1.5编译,需要在pom.xml设置编译版本,如下:
<properties> <!--指定编译版本,否则默认编译jdk1.5--> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties>