Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven find path to dependency with invalid pom

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.

like image 554
MikeFHay Avatar asked Aug 22 '13 14:08

MikeFHay


People also ask

How do you find the dependency of a POM?

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.

What is Dependencymanagement in POM xml?

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.


1 Answers

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

like image 90
Robert Scholte Avatar answered Oct 07 '22 23:10

Robert Scholte