【发布时间】:2017-06-23 21:00:00
【问题描述】:
Maven 告诉我以下内容,即使我已将所有内容都设置为 Java 8。
File -> Project Structure -> Modules
[编辑配置 -> Maven -> 构建 -> 运行][2]
[默认项目结构][3]
全部设置为语言级别 8
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.730 s
[INFO] Finished at: 2017-02-06T20:29:55+01:00
[INFO] Final Memory: 7M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project kingdoms: Compilation failure
[ERROR] /C:/Users/Marius/Desktop/IntelliJ projects/Kingdoms/src/main/java/me/expdev/kingdoms/files/JsonConfig.java:[24,54] diamond operator is not supported in -source 1.6
[ERROR] (use -source 7 or higher to enable diamond operator)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Process finished with exit code 1
任何帮助将不胜感激。我试着用谷歌搜索,但没有发现任何人有这个错误,因此求助于 Stack Overflow。
注意:我使用的是 IntelliJ Ultimate Edition,已获得许可,如果相关的话。
【问题讨论】:
标签: java maven intellij-idea compiler-errors compilation