【发布时间】:2018-11-22 17:55:37
【问题描述】:
我正在使用 maven 和 tycho 插件来构建一个 Eclipse RCP 应用程序。我使用了一些 java 8 的特性,比如 lambda 表达式,但由于编译失败,它无法正确构建。
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.0.0:compile (default-compile) on project ***.***: Compilation failure: Compilation failure:
[ERROR] .filter(Objects::nonNull)
[ERROR] ^^^^^^^^^^^^^^^^
[ERROR] Method references are allowed only at source level 1.8 or above
[ERROR] 2 problems (2 errors)
[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
我的问题是:
- 您认为文件 .settings/org.eclipse.jdt.core.prefs 和 .classpath (我猜不是这个)对于构建是必要的maven 第谷的?我是否必须在这些文件中明确定义 java 8?
- 我是否必须在 pom 文件中指定其他内容?
【问题讨论】:
标签: java maven eclipse-plugin eclipse-rcp tycho