Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resolving maven dependencies

Inovking maven2 goal mvn dependency:list on an artifact pom causes to download the whole dependent artifact packages. I think only those pom files are necessary for resolving dependencies. Aren't they?

like image 813
sof Avatar asked Aug 20 '10 17:08

sof


People also ask

How do I fix Maven dependency issues?

If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.

What are resolved dependencies in Maven?

Description: Goal that resolves the project dependencies from the repository.

How do you resolve dependencies?

Dependency resolution is a process that consists of two phases, which are repeated until the dependency graph is complete: When a new dependency is added to the graph, perform conflict resolution to determine which version should be added to the graph.

How do I force maven to update dependencies?

We can force update in maven by using –U options by using mvn clean install command. In that –U means force update the dependencies of the snapshot. The release dependencies are updated is suppose there are not updated previously.


1 Answers

On the dependecy plugin documentation you can read that dependency:list is an alias for dependency:resolve. What you need is dependency:tree which :

Displays the dependency tree for this project.

Even with dependency:tree you will have to download dependencies.

From Arnaud Héritier (developer on Maven Project)

This is a problem in maven core which doesn't allow in 2.x to resolve dependencies without downloading artifacts.

like image 81
Colin Hebert Avatar answered Sep 30 '22 11:09

Colin Hebert