简体   繁体   中英

Maven / Tycho build fails requiring 'osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))'

I've installed Xtext 2.19 into Eclipse 2019-06 and created a new skeleton Xtext project.
No changes were done to the generated project but mvn clean install fails with:

[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 and Maven 3.6.0 are installed and on the path:

$ 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"

Since I'm not used to Tycho builds and Eclipse RCP I'm looking for an explanation for what the build is looking for when complaining that the following requirement is not met
osgi.ee; (&(osgi.ee=JavaSE)(version=1.8))

As already stated the Xtext project was generated from scratch using the Xtext Wizard inside of Eclipse so I would assume that all required dependencies are properly configured by default and the build's complain refers to some missing requirement in my build environment / machine - but what exactly is missing?

There is not official Support for Java 12 in Xtext 2.19 (as eg Tycho 1.4.0 does not support it). It should work if you use the latest Tycho 1.5.0-SNAPSHOT from

<pluginRepositories>
    <pluginRepository>
      <id>tycho-snapshots</id>
      <url>https://repo.eclipse.org/content/repositories/tycho-snapshots/</url>
    </pluginRepository>
</pluginRepositories>

https://wiki.eclipse.org/Tycho/Release_Notes/1.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM