maven-dependency-plugin

What is pluginManagement in Maven's pom.xml?

喜夏-厌秋 提交于 2019-12-16 19:49:13
问题 This is a snippet of my pom file. .... <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.4</version> <executions> <execution> <phase>install</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> ...... </configuration> </execution> </executions> </plugin> </plugins> ... I use it successfully with the command mvn install But, when I try to enclose it into the "pluginManagement" tag, the maven-dependency

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

喜夏-厌秋 提交于 2019-12-12 10:47:30
问题 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 <?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>my-service</artifactId> <packaging>jar

How do I unpack AAR dependency classes in Maven?

自古美人都是妖i 提交于 2019-12-12 02:22:17
问题 I use Maven and I need to process classes from another dependencies. Before processing the classes, maven-dependency-plugin is used to unpack those dependencies with the unpack-dependencies goal, so then I can process the classes in the target directory. Everything is fine while the referenced dependencies are packaged as JARs. Now I'm faced with an AAR dependency that is required to be class-processed in a special way. The error I get so far is: Failed to execute goal org.apache.maven

Maven dependency not in pom.xml

天涯浪子 提交于 2019-12-12 01:09:43
问题 I have a project which uses spring. It uses version 3.1.1 but, for some reason I really don't know, some spring artifacts are duplicated with two different versions. I look for the those dependencies in all pom.xml files from my project. I also use the dependecy plugin to figure out where were those dependencies included. Here you have an extract of the output of mvn dependency:tree [INFO] | | \- org.springframework:spring-web:jar:3.1.1.RELEASE:compile [INFO] | | +- aopalliance:aopalliance

Maven - Copy Some Dependency JARs into warSourceDirectory

一个人想着一个人 提交于 2019-12-11 09:22:14
问题 Can any Maven plugins copy one or more dependencies (although not all of them) of a .war project into its warSourceDirectory ( src/main/webapp )? I'm working on a Java web-app that will display an applet. I'd like the war project to pick the latest version of some jars (the applet's dependencies) and stick them in /src/main/webapp/ , to save me having to copy them around the place. I've thought about shading and uber-jar-ing the applet itself, but I'd like to split the jars up to save users

The goal “copy-dependencies” does not copy the parent pom

亡梦爱人 提交于 2019-12-11 02:46:12
问题 My project structure is like this: * Foo - API - Core - OSGi All child projects define Foo as their parent (parent has dependencyManagement). Another team is going to use my project. They only need my API layer and they cannot access my maven repository. I need to give them all the dependencies of my API so I executed the following maven command: mvn dependency:copy-dependencies -DincludeScope=compile -Dmdep.copyPom -Dmdep.useRepositoryLayout The dependency-plugin copies everything just fine

maven-dependency-plugin target/classes - Access is denied

旧街凉风 提交于 2019-12-10 15:38:53
问题 I have a multi module project with a parent project A, and two childs project B and C. Project B has a dependency on project C. I use the maven-dependency-plugin to copy the dependencies of B to a lib/ directory in the target/ directory. So, I can use the maven-assembly-plugin to include this lib/ directory in the final zip. The problem is I get the following error when I run mvn clean package on project B: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ...

Maven custom archive extension - how do I use unpack-dependencies?

随声附和 提交于 2019-12-10 14:26:12
问题 I have a custom artfiact type web-module ; just a ZIP but with a custom extension. I then have a project depending on it, I want its dependencies of this custom type to be unpacked. The maven-dependency-plugin unpack-dependencies goal seemed to fit the bill, however I keep getting the error: [INFO] Unknown archiver type Embedded error: No such archiver: 'web-module'. [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle

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

女生的网名这么多〃 提交于 2019-12-10 12:57:56
问题 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 Maven 3 resolution The version of Maven I am using is Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00) Can I fix it or avoid it anyhow? Was it always the case that Maven 2 was used for -Dverbose output but

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

血红的双手。 提交于 2019-12-08 16:43:27
问题 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 be. Module foo adds slf4j-log4j12 and log4j in order to implement the logging. Pretty simple. Now I'm running maven-dependency-plugin:analyze-only and this is what it says for module foo : [WARNING] Unused declared dependencies found: [WARNING] org