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:
- Eclipse 2026-03 with m2e 2.10.100.20260205-1611
- 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.
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:
Short summary:
Our outer class defines its own field
logfrom Log4J2, we redefine our scope of SLF4J toruntime.Our inner class extends a class from a library which defines a private field
logfrom SLF4J. Our inner class attempts to access the fieldlogfrom the outer class and compilation fails.