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
9
votes
2 answers

Maven archiver uses unlocked snapshots in classpath, but copy-dependencies copy locked snapshots

I am trying to use the maven-jar-plugin and maven-dependency-plugin to create an runnable "bundle" of my application. It works fine in most cases, but when I have a snapshot in the dependency hierarchy, the copy-dependencies goals seems to translate…
8
votes
2 answers

How to tell maven-dependency-plugin that the artifact is used in the project?

This is a structure of my multi-module project: /root /api dependencies: slf4j /foo dependencies: slf4j-log4j12, log4j In other words, module api uses slf4j for logging purposes. It doesn't know what the implementation of logging facility will…
yegor256
  • 102,010
  • 123
  • 446
  • 597
8
votes
2 answers

Downloading all plugin dependencies from a maven project

I'm trying to download all plugin dependencies from a maven project before actually using them. I've tried running: mvn dependency:resolve-plugins And this successfully downloads it's plugins and part of their dependencies. For example, for the…
Sirs
  • 1,277
  • 17
  • 30
8
votes
1 answer

destFileName not used by maven-dependency-plugin?

I'm sure this was working! I have a maven dependency plugin config to put a java service wrapper into a particular folder in an appassembler target folder. org.apache.maven.plugins
Paul McKenzie
  • 19,646
  • 25
  • 76
  • 120
8
votes
1 answer

Unpack files from jar if jar is used, copy then extracted files to a directory

I have a large webapp which uses many Maven dependencies. They are included as JAR files, but I want to have a chance to use some of them as an opened project directly in Eclipse. Then dependent projects are linked with m2e. From some of that…
Xdg
  • 1,735
  • 2
  • 27
  • 42
8
votes
2 answers

Maven - Multiple artifact versions in dependency management

Is there a valid use case for having two different versions of the same artifact in the dependency management section of your POM? I'm looking at a project whose root POM contains such an example. The project itself has multiple modules using…
Miro
  • 135
  • 1
  • 3
  • 9
8
votes
2 answers

Is there a way to divide artifacts between test and compile using the maven-dependency-plugin during the copy-dependencies goal?

I have the following configuration: org.apache.maven.plugins maven-dependency-plugin 2.6 analyze
javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
7
votes
1 answer

Maven 3 assembly plugin is very slow

After upgrading to maven 3 , my assembly plugin and assembly plugin only takes comparitively more time to copy stuff mostly. Has anyone faced this issue already, or is there something I need to do so that the performace is faster? I would be glad to…
Neeraj
  • 8,408
  • 8
  • 41
  • 69
7
votes
1 answer

How to make maven use credentials when executing dependency plugin from command line

I have a private Maven repository. It's defined in pom.xml of the project some.id https://some.host/artifactory/some.id In my ~/.m2/settings.xml, I have proper authentication…
Pawel Veselov
  • 3,996
  • 7
  • 44
  • 62
7
votes
3 answers

Maven: download artifact and its deps to a specific directory

I must be missing something. I have searched and searched, and played and tinkered, and I still can't figure out how to do the following with Maven: I would like to download an artifact and all its dependencies (and transitive dependencies), from…
Steven
  • 71
  • 1
  • 2
7
votes
1 answer

maven-dependency-plugin:unpack fails in Eclipse

I have a library of JavaScript in dependency globalmentor-core.jar, and I use maven-dependency in another project to transfer the JavaScript to a web directory: org.apache.maven.plugins
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
7
votes
2 answers

maven-dependency-plugin, copy-dependencies: exclude some artifact ids and their dependencies

I need to copy just one dependency and all its transitive dependencies to a specified folder. I know i can exclude artifacts with "excludeArtifactIds", but I also need to exclude the transitive dependencies of those artifacts, which, apparently…
calin014
  • 429
  • 1
  • 6
  • 17
7
votes
1 answer

How can I get a maven build to fail on duplicate dependencies?

If I have two dependencies which are the same in the same pom, I want the build to fail. Currently I can detect it happening with the Maven Dependency Plugin's "analyze-duplicate". However, there's no option to failOnWarning like some of the others…
7
votes
2 answers

download of a Maven artifact with dependencies from Nexus using the command line

I'm using the command below to download a maven jar from Nexus through the command line. call mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DrepoUrl=http://10.101.15.190:8081/nexus/content/repositories/releases/…
AnOldSoul
  • 4,017
  • 12
  • 57
  • 118
7
votes
1 answer

Maven remove version from dependency jar

I'd like to know if there is a way to remove version number from maven dependency. Let's say for my project I'd like to fetch commons-lang3 3.4 using maven dependency plugin: org.apache.commons
dejvid
  • 97
  • 1
  • 1
  • 5
1 2
3
27 28