When I call mvn dependency:tree
on my project I get the following warnings and error:
[WARNING] The POM for com.sun.xml.stream.buffer:streambuffer:jar:0.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.jvnet.staxex:stax-ex:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:tree (default-cli) on project rdbms-service: Execution default-cli of goal org.apache.maven.plugins:maven-dependency-plugin:2.1:tree failed: For artifact {org.jvnet.staxex:stax-ex:null:jar}: The version cannot be empty. -> [Help 1]
However because the tree build fails, I don't know which dependency is pulling these invalid dependencies in. Is there any way to find out?
I've tried excluding those jars with mvn dependency:tree -Dexcludes=*stream.buffer,*staxex
, but that makes no difference.
In your project's POM, press Ctrl and hover the mouse over the dependency. Click the dependency to open the dependency's POM. In the dependency POM, view the active dependency, its transitive dependencies and their versions. You can check the origin from which the dependency was pulled in.
The dependency management section is a mechanism for centralizing dependency information. When you have a set of projects that inherit from a common parent, it's possible to put all information about the dependency in the common POM and have simpler references to the artifacts in the child POMs.
Try mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:tree
to force Maven to use a more recent version of the maven-dependency-plugin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With