maven-dependency-plugin

maven-dependency-plugin ignores outputDirectory configuration

限于喜欢 提交于 2019-12-01 08:25:40
I want to create a jar file with my main java project and all of it's dependencies. so I created the following plugin definition in the pom file: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.5.1</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <!-- exclude junit, we need runtime dependency only --> <includeScope>runtime</includeScope> <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory> </configuration>

maven-dependency-plugin ignores outputDirectory configuration

[亡魂溺海] 提交于 2019-12-01 06:48:56
问题 I want to create a jar file with my main java project and all of it's dependencies. so I created the following plugin definition in the pom file: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.5.1</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <!-- exclude junit, we need runtime dependency only --> <includeScope>runtime<

What does purge-local-repository actually purge?

有些话、适合烂在心里 提交于 2019-12-01 03:26:43
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 particular project (i.e. whose directory I am in) or will it delete all the contents of my local repo? By default, purge-local-repository will remove from the local repository all the files associated to the version of each dependency (including transitive) of the project it is ran on: Remove the project dependencies from the local repository, and

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

落花浮王杯 提交于 2019-11-30 17:49:40
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 dependencies of my local project, but I want to know the dependencies of something before I add it to my project (ie making an informed decision), and add dependencies to a local pom.xml for the sole purpose of the dependency plug-in seems hackish. I was hoping I could just run something like: mvn dependency:tree "-DgroupId=net.jawr" "-DartifactId

Resolve maven plugin issue: ' Unable to load mojo'

帅比萌擦擦* 提交于 2019-11-30 06:30:33
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 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test': Unable to load the mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin'. A required class is missing: org/apache/maven/surefire/util/NestedCheckedException org.apache.maven.surefire.util.NestedCheckedException How can I resolve this problem? You appear to be experiencing

Filter dependencies copied by Maven's copy-dependency?

假如想象 提交于 2019-11-30 05:59:28
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 second part finished. Is there a better way to do this than how I'm doing it below? I'm essentially deploying these JARs to a lib directory on a server. Unfortunately, the code below includes all JARs, even provided ones, but doesn't include the project output JAR. Should I be using a different plugin for this? <?xml version="1.0"?> <project> ...

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

无人久伴 提交于 2019-11-30 01:49:28
问题 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 dependencies of my local project, but I want to know the dependencies of something before I add it to my project (ie making an informed decision), and add dependencies to a local pom.xml for the sole purpose of the dependency plug-in seems hackish

Resolve maven plugin issue: ' Unable to load mojo'

爱⌒轻易说出口 提交于 2019-11-29 06:15:39
问题 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 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test': Unable to load the mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin'. A required class is missing: org/apache/maven/surefire/util/NestedCheckedException org.apache

Filter dependencies copied by Maven's copy-dependency?

狂风中的少年 提交于 2019-11-29 05:17:04
问题 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 second part finished. Is there a better way to do this than how I'm doing it below? I'm essentially deploying these JARs to a lib directory on a server. Unfortunately, the code below includes all JARs, even provided ones, but doesn't include the

Maven: how to export project with sources and dependencies

廉价感情. 提交于 2019-11-27 20:04:57
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 dependencies packed with it. So I want to have all that dependencies plus my sources gathered in one place, which can be opened with IDE (Eclipse or IDEA) all those libraries detected? Try maven-dependency-plugin with goal copy-dependencies <project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency