I have compilation error: The package javax.xml.stream is accessible from more than one module: <unnamed>, java.xml
. Application with maven install
build succesfully but it doesn't run as java application.
CTRL + SHIFT + T shows me that javax.xml.stream
package is a part of JDK-11 (Modulepath) and stax-api
(Classpath).
stax-api
is a dependency of parent module which cannot be deleted. This problem occurs on Eclipse 2019-12, 2020-03, 2020-06 and IntelliJ and different versions of Java 11.
I tried so far to exclude javax.xml.stream for all dependencies within child
<exclude>javax.xml.stream</exclude>
but with no success.
How can I resolve this issue?