Open sewe opened 8 years ago
I hit this same problem but with pure PDE. The workaround is to open Preferences > Java > Installed JREs > Execution Environments and change the JavaSE-1.7 EE to use a JavaSE 8 JRE.
I don't think it's anything Tycho or m2e-tycho can fix.
Hi,
I hope this is the correct issue tracker for
m2eclipse-tycho
as found at http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.9.0/N/LATEST/.I have an
eclipse-plugin
project, whoseBundle-RequiredExecutionEnvironment
isJavaSE-1.7
. This project is supposed to build one of twoeclipse-target-definition
target platforms. One target platform (mars
) has an execution environment ofJavaSE-1.7
and the other (neon
) has an execution environment ofJavaSE-1.8
. Also, themars
target platform contains a library that requiresJavaSE-1.7
, whereas theneon
target platform contains a newer version of said library that requiresJavaSE-1.8
.The problem occurs if I
Import > Maven > Exisiting Maven Project
myeclipse-plugin
project with theneon
target platform selected in its POM.The Tycho m2e connector configures a project-specific compiler compliance level of 1.7 (good), but also a
JavaSE-1.7
“JRE System Library” based on the project'sBundle-RequiredExecutionEnvironment
(bad).This is a problem because I now get compilation errors:
The project’s code itself does not use any Java 8 feature, but the newer version of the library does. IMHO, the JRE System Library” selected should be taken from the target platform rather than the
Bundle-RequiredExecutionEnvironment
header. Or am I mistaken?