Maven finds dependency path with invalid pom

When I call mvn dependency:tree in my project, I get the following warnings and errors:

[WARNING] 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] POM for org.jvnet.staxex: stax-ex: jar: 1.0 is invalid, transit dependencies (if any) will not be available, enable debug logging for more details

[ERROR] Failed to execute the target org.apache.maven.plugins: maven-dependency-plugin: 2.1: tree (default-cli) in the rdbms-service project: Executing default-cli of the target org.apache.maven. plugins: maven-dependency-plugin: 2.1: tree failed: for artifact {org.jvnet.staxex: stax-ex: null: jar}: version cannot be empty. β†’ [Help 1]

However, since tree assembly does not work, I don’t know which dependency pulls these invalid dependencies. Is there any way to find out?

I tried to exclude these banks using mvn dependency:tree -Dexcludes=*stream.buffer,*staxex , but that doesn't matter.

+7
java maven dependencies
source share
2 answers

Try mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:tree to force Maven to use the newer version of the maven-dependency plugin

+5
source share

org.jvnet.staxex: stax-ex: 1.0 seems to skip the item in pom in the remote repository, contains instead that was never included in the pom.xml AFAIK schema. Apparently, some manually created pom (in the wrong way) that ended up in java.net and then in the center.

Try to eliminate the stax-ex dependency and explicitly define a new one. For example:

  <!-- jaxws-rt with replaced broken stax-ex --> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>jaxws-rt</artifactId> <version>2.1.7</version> <exclusions> <exclusion> <groupId>org.jvnet.staxex</groupId> <artifactId>stax-ex</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.jvnet.staxex</groupId> <artifactId>stax-ex</artifactId> <version>1.2</version> </dependency> 
0
source share

All Articles