Eric Francis
Eric Francis

Reputation: 24267

How do I interpret Path to Dependency?

I'm getting the error below. What does "Path to dependency" refer to and why is there 3 locations?

I have almost no Maven experience.

Missing:
----------
1) com.sun.jmx:jmxri:jar:1.2.1

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) com.services:Common:jar:1.0.0.0
        2) log4j:log4j:jar:1.2.15
        3) com.sun.jmx:jmxri:jar:1.2.1

Upvotes: 2

Views: 165

Answers (2)

Michał Kalinowski
Michał Kalinowski

Reputation: 17933

This Path to dependency thing is something like stacktrace for exceptions. It says what dependencies' transitives causes the error. Log4j case is somehow specific in fact. They screwed up its dependencies in 1.2.15 version and actually require pretty more than it really need. To be honest, best thing you can do for this is to use 1.2.16 version that transitively depend on libs that are indeed needed.

There is a licensing issue with jmxri artifact that origins in Sun's Java days. That's why this stuff isn't available in public Maven repositories so far.

Upvotes: 0

Dave Newton
Dave Newton

Reputation: 160170

Common requires Log4J. Log4J requires JMX. There are three "locations" because that's how long the dependency path is. A dependency is path is (more or less) "what made me want this library?"

(But it doesn't; upgrade or downgrade your Log4J dependency--IIRC this has been fixed in 1.2.16, and didn't exist before 1.2.mumble.)

Upvotes: 2

Related Questions