Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list missing dependencies of Maven project

Tags:

java

maven

I have a Maven project with 100's of dependencies. Some of these dependencies are not available.

When I run mvn install against the parent pom file (this parent pom references the other projects) then I receive errors that some Maven dependencies cannot be found. But I have to add those dependencies before I can discover what other dependencies may be missing.

Is there a Maven command which will list of the missing dependencies for a project ?

Update : Another options is to clear out repository folder and attempt to rebuild with Eclipse/Maven plugin - missing dependencies for all projects appear to be listed in problems tab

like image 446
blue-sky Avatar asked Oct 29 '14 19:10

blue-sky


People also ask

How do I download missing dependencies in Maven?

You can find this in Window > Preferences > Maven > User Settings , and then point Global Settings to your external maven settings. xml . Then i removed the broken projects and re-added them, and the Maven Dependencies library appeared again. Save this answer.

How do I fix missing Maven dependencies in eclipse?

My problem solved by right click on project -> Maven -> Update project. Then the Maven Dependencies appear on the project explore. Save this answer.

Where can I find Maven dependencies?

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.


1 Answers

Maven shows you all dependencies that are missing in the first tier. It's impossible to show also traversing dependencies because without poms included in those dependencies, Maven has no information about further dependencies. So only solution in that situation is to add all missing dependencies (absolutely with pom files) and then re-run maven (install or just mvn dependency:resolve)

like image 191
Jakub Kubrynski Avatar answered Sep 18 '22 13:09

Jakub Kubrynski