12

When I build my project, I get these warnings:

[INFO] ------------------------------------------------------------------------
[INFO] Building XXX
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.update:org.eclipse.update.configurator:jar:3.2.0 is missing, no dependency information available
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore:jar:2.3.2 is missing, no dependency information available
[WARNING] The POM for com.ibm.icu:com.ibm.icu:jar:3.4.4 is missing, no dependency information available

In my build, I overwrite the versions of these dependencies and the build itself succeeds.

What is the fastest way to fix the warnings?

Edit: What is the fastest way to locate the POMs which contain these versions?

Note: I have 7000 POMs in my local repo.

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • Change the pom's of the dependencies you are using or use other versions where the pom's are correct or even exist. – khmarbaise Apr 27 '11 at 16:31
  • This is clearly stating that the version of the dependency you are giving is non-existent in your local repository. Either put the correct version or try removing the element altogether. – Arpit Apr 28 '11 at 14:27
  • @Aprit: The version in the POM of my project is correct; it's a transitive dependency which is wrong. How can I find out which one? `mvn dependecy:tree` only shows the final versions, not the ones which were overwritten. – Aaron Digulla Apr 28 '11 at 15:08

3 Answers3

9

try the analyze tools from the dependency-plugin

especially the mvn dependency:analyze-dep-mgt

p1brunne
  • 444
  • 3
  • 3
3

A few things that might help:

mvn dependency:tree -Dverbose=true can spit out unused duplicates/versions. Wasn't enough in my case, however, for some reason it didn't show the offending jar's listed [?]. It also doesn't show the ommitted jar's descendants, which may or may not be useful.

ref: http://jira.codehaus.org/browse/MDEP-123

Intellij can list what it thinks are offending pom's and paths (open the pom.xml file, hover over the underlined "project":

intellij dependency list

Unfortunately none of these was enough for me, either.

Then I noticed that if you delete the offending directory from your ~/.m2/repository, it will be downloaded again and basically empty. So I think what this error message can sometimes mean is "your nexus lists a version that it doesn't actually have available for download." It appears that maven by default, if you request for instance commons-logging 1.1.1, will attempt to download the pom's for all known versions of common-logging, then, in my case, it spit out that warning but it was benign. Phew!

So in truth, none of your projects might point to the warned of bad pom (or bad version, etc.) Except nexus' metadata index.

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
0

You could use dependency:tree to see what pom references the one you're missing

Lionel
  • 33,274
  • 1
  • 16
  • 5
  • As I said several time: That shows me what the build uses. The build works. But I still get the warnings because somewhere inbetween, Maven looks at POMs which are *not* part of the final classpath. How do I see those? – Aaron Digulla Sep 19 '12 at 10:08
  • The obvious way would be to remove the overrides from your pom and run dependency:tree then. That's still better than sifting through 7000 poms... However I thought the dependencyManagement section would override without giving you warnings. Do you have a simple example of something that generates that type of problem that we could run? – Lionel Oct 10 '12 at 19:35