Questions tagged [maven-dependency-plugin]

The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.

The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.

When using the Maven Dependency Plugin, it is recommended to keep in mind the Maven Dependency Mediation mechanism, what Maven coordinates are and how Maven dependencies are declared and handled.

More information

420 questions
323
votes
5 answers

What is pluginManagement in Maven's pom.xml?

This is a snippet of my pom file. .... org.apache.maven.plugins maven-dependency-plugin 2.4
189
votes
13 answers

Force re-download of release dependency using Maven

I'm working on a project with dependency X. X, in turn, depends on Y. I used to explicitly include Y in my project's pom. However, it was not used and to make things cleaner, I instead added it to X's pom as a dependency. X is marked as a release…
volni
  • 5,196
  • 8
  • 38
  • 44
98
votes
8 answers

Eclipse : Maven search dependencies doesn't work

I created a new simple Maven project in a new Workspace. When I open the pom.xml's Dependencies view in Eclipse editor, and I choose Add.. dependency, there's no search results no matter what search criteria I input in the search fields: It…
Majid Laissi
  • 19,188
  • 19
  • 68
  • 105
86
votes
5 answers

Maven WAR dependency

I am writing a project for acceptance testing and for various reasons this is dependent on another project which is packaged as a WAR. I have managed to unpack the WAR using the maven-dependency-plugin, but I cannot get my project to include the…
deelo55
  • 1,161
  • 2
  • 12
  • 9
52
votes
3 answers

Maven - Depend on assembled zip

I'm trying to have a Project B pull down (and unpack) a ZIP built by Project A and deployed to a remote repository. The ZIP is created and attached using the maven-assembly-plugin, with packaging type…
42
votes
7 answers

How to get access to Maven's dependency hierarchy within a plugin

In my plugin I need to process the dependency hierarchy and get information (groupId, artifactId, version etc) about each dependency and if it was excluded. What is the best way to do this?
talk to frank
  • 1,821
  • 4
  • 20
  • 21
40
votes
5 answers

What is the difference between "+-" and "\-" in maven dependency tree output?

If we consider the following example, what is the difference between "+-" and "\-" symbols and what do they signify? [INFO] [dependency:tree] [INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT [INFO] +-…
38
votes
4 answers

Declare Maven dependency as test runtime only

What is the best way to declare a Maven dependency as only being used for the test runtime (but not test compilation) class path? Specifically, I want slf4j-api (a logging facade) as a typical, compile-scope dependency, but I want slf4j-simple (the…
Trevor Robinson
  • 15,694
  • 5
  • 73
  • 72
28
votes
3 answers

Maven: how to export project with sources and dependencies

I have Maven project with dependencies in repo and stuff. I want to "export" its sources with all dependencies so that I can successfully open it in IDE without Maven running on a machine. When packaging project into war file, it has all…
glaz666
  • 8,707
  • 19
  • 56
  • 75
26
votes
3 answers

Filter dependencies copied by Maven's copy-dependency?

I need to essentially accomplish the following: Build my library into a JAR. (Easy, already done.) Copy my library's dependencies to a local folder, including the main project JAR, excluding dependencies marked as provided. I can't seem to get the…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
25
votes
3 answers

Display omitted versions in maven dependency:tree?

In Eclipse, when I go to the Maven Dependency Hierarchy page, I get output that states what conflicts caused versions to be omitted: However, if I use dependency:tree, that's omitted and I only see the evrsions which are actually used: | +-…
Robert Fraser
  • 10,649
  • 8
  • 69
  • 93
23
votes
1 answer

Maven Dependency Tree - Plus (+) vs Backslash (\)

What's the difference on a mvn dependency-tree output between a '+' and a '\'. It seems fairly arbitrary to me, but I'm sure it's not... +- com.tom:artifact:pom:6.0.0:compile | +- com.tom:artifact2:jar:1.0.4:compile | \-…
Tom
  • 463
  • 4
  • 10
20
votes
5 answers

Resolve maven plugin issue: ' Unable to load mojo'

I have configured all the dependencies in my pom.xml through maven. When i give the command mvn install I get the following error: [INFO] Internal error in the plugin manager executing goal …
19
votes
3 answers

What does purge-local-repository actually purge?

I am running the following command from within a maven project directory: mvn dependency:purge-local-repository What is the expected behavior? Will it delete (and re-download?) all the dependencies already existing in my local repo for that…
pkaramol
  • 16,451
  • 43
  • 149
  • 324
17
votes
6 answers

Suppress Maven Dependency Plugin's "Unused declared dependencies found" warnings

The maven-dependency-plugin identifies what it believes to be unused dependencies when you compile by producing warnings at compile time. [WARNING] Unused declared dependencies found: [WARNING] org.foo:bar-api:jar:1.7.5:compile In some cases…
vpiTriumph
  • 3,116
  • 2
  • 27
  • 39
1
2 3
27 28