【发布时间】:2020-01-08 18:45:01
【问题描述】:
我已将 Xtext 2.19 安装到 Eclipse 2019-06 中并创建了一个新的 Xtext 框架项目。
未对生成的项目进行任何更改,但 mvn clean install 失败并显示:
[ERROR] Cannot resolve target definition:
[ERROR] Software being installed: org.eclipse.jdt.feature.group 3.18.100.v20190821-1800
[ERROR] Missing requirement: org.eclipse.ant.core 3.5.500.v20190701-1953 requires 'osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))' but it could not be found
[ERROR] Cannot satisfy dependency: org.eclipse.ant.ui 3.7.500.v20190518-1030 depends on: osgi.bundle; org.eclipse.ant.core [3.2.0,4.0.0)
[ERROR] Cannot satisfy dependency: org.eclipse.jdt.feature.group 3.18.100.v20190821-1800 depends on: org.eclipse.equinox.p2.iu; org.eclipse.ant.ui [3.7.500.v20190518-1030,3.7.500.v20190518-1030]
[ERROR]
[ERROR] Failed to resolve target definition /home/.../eclipse-workspace/mydsl.parent/mydsl.target/mydsl.target.target: See log for details -> [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/MavenExecutionException
Java 12 和 Maven 3.6.0 已安装并在路径上:
$ java -version
openjdk version "12.0.2" 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+9-Ubuntu-119.04)
OpenJDK 64-Bit Server VM (build 12.0.2+9-Ubuntu-119.04, mixed mode)
$ echo $JAVA_HOME
/usr/lib/jvm/java-12-openjdk-amd64
$ mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 12.0.2, vendor: Private Build, runtime: /usr/lib/jvm/java-12-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.0.0-25-generic", arch: "amd64", family: "unix"
由于我不习惯 Tycho 构建和 Eclipse RCP,我正在寻找一个解释,说明当抱怨不满足以下要求时构建正在寻找什么osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))
如前所述,Xtext 项目是使用 Eclipse 中的 Xtext 向导从头开始生成的,因此我假设默认情况下所有必需的依赖项都已正确配置,并且构建的抱怨是指我的构建环境/机器中缺少一些需求 - 但是究竟缺少什么?
【问题讨论】:
-
Xtext 还没有对 Java 12 的官方支持。对于第谷,我不确定。因此首先要检查的是它是否适用于 java 11