Skip to content

Take “JRE System Library” selected by target platform #30

@sewe

Description

@sewe

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, whose Bundle-RequiredExecutionEnvironment is JavaSE-1.7. This project is supposed to build one of two eclipse-target-definition target platforms. One target platform (mars) has an execution environment of JavaSE-1.7 and the other (neon) has an execution environment of JavaSE-1.8. Also, the mars target platform contains a library that requires JavaSE-1.7, whereas the neon target platform contains a newer version of said library that requires JavaSE-1.8.

The problem occurs if I Import > Maven > Exisiting Maven Project my eclipse-plugin project with the neon 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's Bundle-RequiredExecutionEnvironment (bad).

This is a problem because I now get compilation errors:

The type java.util.function.Supplier cannot be resolved. It is indirectly referenced from required .class files

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions