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

Why were Spring Boot starter dependencies designed to be used contrary to the stated intent of Maven's transitive dependency mechanisms?

According to the Maven dependency documentation it is intended that all compile dependencies be explicitly listed, rather than transitively used at compile time: it is intended that [transitive compile dependencies] should be runtime scope instead,…
15
votes
1 answer

Artifact has not been packaged yet - maven-dependency-plugin

When I build a multi module maven project(using mvn clean compile) where one dependency(part of the build reactor) is copied into another using dependency:copy, then maven complains with the below error. Artifact has not been packaged yet. When…
coderplus
  • 5,793
  • 5
  • 34
  • 54
14
votes
1 answer

How to list the transitive dependencies of an artifact from a repository?

I was wondering: is there a way using the Maven Dependency plug-in (or something else on the command-line), to list the transitive dependencies of an artifact from a repository (ie not in my pom.xml)? I know can use mvn dependency:tree to list the…
Sled
  • 18,541
  • 27
  • 119
  • 168
13
votes
1 answer

mvn dependency:go-offline - how do you set params on the command line or at all

I want to download everything except my own dependencies, which I haven't compiled yet. I think what I need is excludeGroupIds, but how to I set it, or anything else in https://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html…
Alex028502
  • 3,486
  • 2
  • 23
  • 50
13
votes
5 answers

mvn dependency:tree fails on trivial project

I've got a pretty complex project (about 100 modules) on which I'd like to run mvn dependency:tree. It fails, complaining about dependencies it cannot resolve. The project otherwise compiles fine. So I created the most basic project I could come up…
Feuermurmel
  • 9,490
  • 10
  • 60
  • 90
13
votes
1 answer

Gradle equivalent of maven-dependency-plugin

My root problem is that when running "spring-test"-based tests for my controllers and Freemarker views I need to have all taglibs inside WEB-INF/lib folder - otherwise freemarker will not find them during tests. I solved this issue with the…
Ivan Sopov
  • 2,300
  • 4
  • 21
  • 39
11
votes
3 answers

Maven: unpack zip artifact to a SPECIFIC folder name

I am trying to download tomcat zip artifact and unpack it int a folder named tomcat. What i get is tomcat/apache-tomcat-7.0.19/ How can I get rid of the annoying intermediate directory? org.apache.maven.plugins
archmisha
  • 199
  • 1
  • 2
  • 12
11
votes
3 answers

Spring boot core dependencies seen as unused by maven-dependency-plugin

maven-dependency-plugin detects spring boot dependencies as unused, but they are actually requied to run my application. Would I have made something wrong ? My pom.xml
Pleymor
  • 2,611
  • 1
  • 32
  • 44
10
votes
3 answers

maven-dependency-plugin:copy tries to copy classes

I have parent pom and two module poms. In first module I want to copy second module (jar) to some folder. When I compiling project from first module pom - it works, but when I'm trying to compile from parent project pom, plugin tries to copy module…
chardex
  • 285
  • 3
  • 14
10
votes
3 answers

maven: copy resource from dependent jar to target folder

I need to copy a resource file (menu.xml) from the root of a dependent jar file to the root of the output directory of my current project, before the tests are executed during the build. The file must be available for the tests but also later for…
Alex
  • 1,126
  • 1
  • 11
  • 24
10
votes
1 answer

"Using Maven 2 dependency tree to get verbose output, which may be inconsistent with actual Maven 3 resolution"

I have changed used version of maven-dependency-plugin from 2.8 to 2.10. Now, when I run mvn dependency:tree -Dverbose I see the following warning: [WARNING] Using Maven 2 dependency tree to get verbose output, which may be inconsistent with actual…
wilx
  • 17,697
  • 6
  • 59
  • 114
10
votes
2 answers

How to determine which Maven dependency is needing a missing dependency?

I am trying to build an old Maven project and I'm getting the error: [ERROR] Failed to execute goal on project myapp: Could not resolve dependencies for project com.initech.myapp:war:${buildVersion}: Failure to find…
Sled
  • 18,541
  • 27
  • 119
  • 168
9
votes
2 answers

How do I strip subdirectories when using maven dependency plugin

There is a jar file with following structure: /-- |-dir1 |-file1 |-file2 |-file3 |-dir2 |-dir3 I set filter to take files only from dir1 dir1/* it successfully takes files only from that directory, but in target…
michael nesterenko
  • 14,222
  • 25
  • 114
  • 182
9
votes
3 answers

How To Add Maven Dependency (Android Studio)

I have this code below.. me.gujun.android.taggroup library 1.4 apklib But where do you put this in Android Studio? I've already…
Char
  • 2,073
  • 8
  • 28
  • 45
9
votes
1 answer

maven-dependency-plugin:unpack Error

I'm trying to extract some .exe files from a dependency jar file and put them under ${project.build.directory}/classes/. But when I execute: mvn clean compile dependency:unpack I get: Failed to execute goal…
PistolPete
  • 766
  • 3
  • 10
  • 25
1
2
3
27 28