I am using JDK 19 in a modular maven project. My project compiles in the shell, but I get errors in Eclipse.
The package org.slf4j is accessible from more than one module: <unnamed>, org.slf4j
The following compiler args work with maven in the shell.
<compilerArgs>
<arg>--patch-module</arg>
<arg>org.slf4j=${settings.localRepository}/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.jar</arg>
</compilerArgs>
How can I teach Eclipse also to use these args?
--patch-moduledoes not make sense here. Learn what the error messageThe package ... is accessible from more than one module: ...means and then fix it even thoughjavacdoes not show it.<unnamed>not formatted as Code Sample.--patch-moduleis misused here to "patch" a Maven dependency. Maybe trial and error resulted in this "creative" solution.