我想禁止java 8 maven项目中的重复类,我不知道如何解决以下“冲突”
找到重复的课程:
Found in:
javax.xml.stream:stax-api:jar:1.0-2:compile
stax:stax-api:jar:1.0.1:compile
Duplicate classes:
javax/xml/stream/XMLEventReader.class
javax/xml/stream/StreamFilter.class
javax/xml/stream/FactoryFinder$ClassLoaderFinderConcrete.class
javax/xml/stream/util/StreamReaderDelegate.class
javax/xml/stream/events/StartDocument.class
javax/xml/stream/EventFilter.class
javax/xml/stream/XMLEventWriter.class
javax/xml/stream/XMLStreamConstants.class
javax/xml/stream/events/EntityDeclaration.class
javax/xml/stream/events/ProcessingInstruction.class
javax/xml/stream/XMLInputFactory.class
javax/xml/stream/Location.class
javax/xml/stream/FactoryFinder$1.class
javax/xml/stream/events/DTD.class
javax/xml/stream/XMLStreamException.class
javax/xml/stream/util/XMLEventAllocator.class
javax/xml/stream/events/Characters.class
javax/xml/stream/events/Namespace.class
javax/xml/stream/XMLStreamWriter.class
javax/xml/stream/events/NotationDeclaration.class
javax/xml/stream/FactoryFinder$ClassLoaderFinder.class
javax/xml/stream/util/XMLEventConsumer.class
javax/xml/stream/events/XMLEvent.class
javax/xml/stream/XMLEventFactory.class
javax/xml/stream/events/StartElement.class
javax/xml/stream/events/EndDocument.class
javax/xml/stream/XMLStreamReader.class
javax/xml/stream/events/EntityReference.class
javax/xml/stream/util/EventReaderDelegate.class
javax/xml/stream/XMLReporter.class
javax/xml/stream/XMLResolver.class
javax/xml/stream/events/EndElement.class
javax/xml/stream/FactoryConfigurationError.class
javax/xml/stream/events/Comment.class
javax/xml/stream/events/Attribute.class
javax/xml/stream/FactoryFinder.class
javax/xml/stream/XMLOutputFactory.class
一个stax jar来自jersey-json
[INFO] +- com.sun.jersey:jersey-json:jar:1.19.3:compile
[INFO] | +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] | | \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] | | +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
另一个来自poi
[INFO] | +- org.apache.poi:poi-ooxml:jar:3.11:compile
[INFO] | | +- (org.apache.poi:poi:jar:3.11:compile - omitted for duplicate)
[INFO] | | \- org.apache.poi:poi-ooxml-schemas:jar:3.11:compile
[INFO] | | \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] | | \- stax:stax-api:jar:1.0.1:compile
我认为从poi中删除stax-api
依赖项是安全的,因为它是从JDK 1.6开始提供的
然而,球衣部分也是可疑的,为什么当它想要使用stax时它被称为jersey-json
?
这个项目实际上只使用了json
你有什么建议?