- The package javax.xml.transform.stream is accessible from more than one module: <unnamed>, java.xml

Hi
I’m migrating my Gradle plugin from Java 8 to Java 11. In Eclipse I get these “The package javax.xml.transform.stream is accessible from more than one module: ,
java.xml” errors. After excluding “xml-apis” from all dependencies the errors are still there.

I found out, that “gradleApi” includes these classes as well. So my best guess is, that the errors are because of this. Can I exclude the specific package from gradleApi (which I do not use explicitly but is added when using the java-gradle-plugin). Or do you have some other ideas what the problem might be? The project builds fine.

regards
Stefan

That sounds like you try to build your Gradle plugin as a JPMS module, which does not really make sense, as it will not be run as a JPMS model in the end.

I fixed it by adding org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage=enabled to “.settings/org.eclipse.jdt.core.prefs”.