Home > Enterprise >  Maven - Scanned from multiple locations warning from the same dependency
Maven - Scanned from multiple locations warning from the same dependency

Time:09-02

This is the warning I get:

[WARNING] org.apache.fop.accessibility.StructureTreeEventHandler scanned from multiple locations: 
jar:file:///C:/Users/westjjes/.m2/MY_APP/org/apache/xmlgraphics/fop/2.6/fop-2.6.jar!/org/apache/fop/accessibility/StructureTreeEventHandler.class, 

jar:file:///C:/Users/westjjes/.m2/MY_APP/org/apache/xmlgraphics/fop-core/2.6/fop-core-2.6.jar!/org/apache/fop/accessibility/StructureTreeEventHandler.class

When I look at my dependency tree this is what I see:
Dependency tree

How is this even possible and how do I fix it? I can't exclude fop-core because then my app won't compile.

CodePudding user response:

There is open issue for similar problem: FOP-3088

One of proposition is:

Can you reference

--- org.apache.xmlgraphics:fop-util:2.6
--- org.apache.xmlgraphics:fop-events:2.6
--- org.apache.xmlgraphics:fop-core:2.6

instead of the parent, as the parent is designed for cmd line use outside of mvn

  • Related