java – Please, help — I can’t export Eclipse plugin with ‘The package javax.xml.parsers is accessible from more than one module’ error
I know, that this topic is discussed already on SO, as well on other sites. But, because I’m newbie in Java in general and in Eclipse plug-ins development in particular, I can’t understand how to fix it.
I’m fixing sometimes the CDT IDE plug-ins for the private purposes. Previously, I was exporting the patched plug-in in the Eclipse SDK into the CDT plugins directory. Like in the other similar cases, I had switched the Java to 17 version and after this I faced with error mentioned in the subject.
I have read several topics on this (like this or other similar), but because of lack of knowledge I really don’t understand how to apply what is being suggested in this articles. I.e., where exactly should I put in the project’s pom.xml
the <exclude>
section?
For example, I have recently tried to patch the org.eclipse.linuxtools.docker.core
plug-in and I’ve got the following errors:
----------
7. ERROR in /home/serge/Projects/Eclipse/PDE/CDT/linuxtools/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DefaultDockerConnectionStorageManager.java (at line 24)
import javax.xml.parsers.DocumentBuilder;
^^^^^^^^^^^^^^^^^
The package javax.xml.parsers is accessible from more than one module: <unnamed>, java.xml
...
----------
10. ERROR in /home/serge/Projects/Eclipse/PDE/CDT/linuxtools/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DefaultDockerConnectionStorageManager.java (at line 36)
import org.w3c.dom.Document;
^^^^^^^^^^^
The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml
----------
...
and so on. I found (at least, I think so), that the package from within the org.eclipse.linuxtools.docker.core
‘s dependencies causing this behaviour is the jakarta.xml.bind
. But, I’m completely in doubt what should I do with this. Because all of the articles I found say something like: “Add section”, but I have not found at least one detailed description where exactly this section should be put and what exactly it means (i.e., what should I adjust in this section to reach my specific goal).
So, if it’s possible, explain please this topic in some more detailed way or give a link to a corresponding article.
Thank you!
Read more here: Source link