Maven/Tycho构建失败,需要“osgi.ee”;(&(osgi.ee=JavaSE)(版本=1.8))'
我已经在Eclipse2019-06中安装了XTEXT2.19,并创建了一个新的框架Xtext项目。 未对生成的项目进行任何更改,但mvn clean安装失败,原因是:Maven/Tycho构建失败,需要“osgi.ee”;(&(osgi.ee=JavaSE)(版本=1.8))',maven,osgi,xtext,tycho,Maven,Osgi,Xtext,Tycho,我已经在Eclipse2019-06中安装了XTEXT2.19,并创建了一个新的框架Xtext项目。 未对生成的项目进行任何更改,但mvn clean安装失败,原因是: [ERROR] Cannot resolve target definition: [ERROR] Software being installed: org.eclipse.jdt.feature.group 3.18.100.v20190821-1800 [ERROR] Missing requirement: or
[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构建和EclipseRCP,所以当我抱怨没有满足以下要求时,我正在寻找一个解释来解释构建在寻找什么
osgi.ee&ee=javaservision=1.8
如前所述,Xtext项目是使用Eclipse内部的Xtext向导从头开始生成的,因此我假设默认情况下所有必需的依赖项都已正确配置,并且构建的抱怨指的是我的构建环境/计算机中缺少的某些需求-但到底缺少了什么?没有官方消息Xtext 2.19中对Java 12的支持,例如Tycho 1.4.0不支持它。如果您使用的是最新的Tycho 1.5.0-SNAPSHOT,那么它应该可以正常工作
<pluginRepositories>
<pluginRepository>
<id>tycho-snapshots</id>
<url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
</pluginRepository>
</pluginRepositories>
Xtext还没有对Java12的官方支持。对于第谷,我不确定。因此,首先要检查的是它是否适用于Java11