Skip to content

Project doesn't compile in Eclipse/compiles in mvn #2161

@lrozenblyum-iqmessenger

Description

The project https://github.com/lrozenblyum/m2e-core-compilation-issue-2/tree/main/eclipseRuntimeCompilation
doesn't compile in Eclipse yet it compiles in mvn

Oracle JDK 21.0.8
Maven 3.6.3

Reproduced in:

  1. Eclipse 2026-03 with m2e 2.10.100.20260205-1611
  2. Eclipse 2024-06 with m2e 2.6.2.20240828-1954

Short summary:

Our outer class defines its own field log from Log4J2, we redefine our scope of SLF4J to runtime.

Our inner class extends a class from a library which defines a private field log from SLF4J. Our inner class attempts to access the field log from the outer class and compilation fails.

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