sof
sof

Reputation: 9649

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?

Upvotes: 12

Views: 55007

Answers (3)

Colin Hebert
Colin Hebert

Reputation: 93157

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.

Upvotes: 19

David A. Gray
David A. Gray

Reputation: 1075

I am working with the current edition of Maven (the plug-in that shipped with Eclipse Neon), and I'm still working to get my head around how to make it do all the magical things it is claimed to be able to do.

I have the screen pictured below, in which the dependency highlighted in the left pane is unresolved. !Dependency tree, showing missing dependency1

I thought that selecting (executing) the Update Project item off the project's context menu, as shown in the following image, would resolve it, but it left me with three errors, all, one way or another, the result of a missing dependency.

!Maven fly-out menu in project context menu2

By examining the file system, I have confirmed that the dependency is, in fact, absent.

Color me confused; why didn't that action download the missing dependency?

Upvotes: 0

amra
amra

Reputation: 16875

Each mojo (plug-in in the Apache Maven) has a functionality description. See all dependency plugin functionality.

Upvotes: 1

Related Questions