The package org.w3c.dom is accessible from more than one module: , java.xml

前端 未结 7 1126
野性不改
野性不改 2021-01-03 19:37

I am unable to import org.w3c.dom.NodeList package to Eclipse. It is showing

The package org.w3c.dom is accessible from more than one mo

7条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-03 19:57

    I had a similar issue because of a transitive xml-apis dependency. I resolved it using a Maven exclusion:

    
        org.apache.xmlgraphics
        fop
        0.95
    
        
            
                xml-apis
                xml-apis
            
        
    
    

    Use mvn dependency:tree to see who brings in the transitive dependency, and then exclude that from there.

提交回复
热议问题