423 questions
1
vote
1
answer
1k
views
Have mvn dependency:list print out all artifacts in a group except for those in a sub-group?
I'm trying to list all artifacts in com.example, except those in com.example.foo.bar.
For mvn dependency:tree, I can do this:
mvn dependency:tree -Dexcludes=*bar* -Dincludes=com.example.*
However, ...
0
votes
1
answer
2k
views
How to create a jar with Maven that includes dependencies in a separate folder for each dependency
I want build a Maven project with dependencies outside the .jar, but every dependency must be in a separate directory as:
libs/${dependency.groupId}/${dependency.artifactId}/${dependency.version}
...
7
votes
2
answers
14k
views
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/...
4
votes
1
answer
2k
views
How to rename latest snapshot version to include a version number
Question: How can I rename the snapshot version of file to include the version number?
I use <version>LATEST</version> to download the latest version, but how can I use it in the <...
7
votes
1
answer
12k
views
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:
<dependency>
...
0
votes
1
answer
264
views
Collect dependency information from pom.xml
I'd like to print a file containing listing of all the dependencies and their versions in my pom.xml. (no need to go inside of each dependency)
My ultimate goal is to have the dependency + version ...
11
votes
3
answers
6k
views
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
<?xml version="1.0" ...
10
votes
3
answers
36k
views
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 ...
1
vote
1
answer
1k
views
How to remove a a specific directory from the Maven's target directory at the end of the build?
I have a task to unpack all the jars mentioned in the pom.xml and then jar the unpacked content into one single jar. I am able to do this using the unpack-dependency goal of the dependency plugin and ...
0
votes
1
answer
528
views
Maven dependency order check
I need to check the Maven dependency injection order automatically. In a Maven module I take two dependencies with the same classes name and package. One dependency should always have priority on the ...
0
votes
0
answers
910
views
How to get source code from a maven dependency jar
I'm trying to download the source code from a .jar file. I know about mvn dependency:sources but I don't have access to the jar's pom.xml file to run that command.
What I am trying to accomplish: I ...
24
votes
6
answers
34k
views
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] ...
1
vote
0
answers
76
views
Difference in transitive dependencies after Maven upgrade 2.2.1 to 3.2.5
My company's infrastructure changed which forced upgrade from Maven 2.2.1 to maven 3.0.5
Structure of my project is one EAR containing a few modules. EAR's dependencies are stored in it's lib folder ...
3
votes
3
answers
4k
views
Maven maven-dependency-plugin copy-dependencies ignores outputDirectory
I'm try to use the maven-dependency-plugin's copy-dependencies goal.
I checked its official example with the snippet below.
My problem is: the dependencies are always copied to
target\dependency ...
0
votes
0
answers
66
views
Why does profiles defined with modules are executed first -maven?
I have case where i want to download the jar and unpack the jar.
Within that jar i need to invoke the pom.xml from particular location ,
For eg: I downloaded jar and unpacked at
/home/sohanb/admin/...
-1
votes
1
answer
29
views
Trying to copy denedecy bot not working
<modelVersion>4.0.0</modelVersion>
<artifactId>eau-claims-jar</artifactId>
<groupId>com</groupId>
<name>eau-claims-jar</name>
<packaging>jar</...
4
votes
2
answers
5k
views
Export Maven dependencies and maintain repository folder structure
I'm trying to know whether it's possible to export/copy dependencies of a project managed using Maven while maintaining the folder structure that is adopted in the local repository.
The root of my ...
1
vote
2
answers
4k
views
getting NoClassDefFoundError ArchiverException when running mvn package
I want to deploy my tomcat based web application onto heroku host. So I followed the approach given in this link: https://devcenter.heroku.com/articles/java-webapp-runner. So here is my pom.xml:
<...
4
votes
2
answers
9k
views
Maven Integration with Query DSL
I am trying to integrate an existing project in maven with query dsl I have added the dependencies as below `
<dependency>
<groupId>com.mysema.querydsl</groupId>
<...
2
votes
1
answer
445
views
data flow sdk build fails
When I try to build the dataflow sdk from the source cloned from [1], it fails with the following stack trace.
Please help me to get it resolved.
[1] https://github.com/GoogleCloudPlatform/...
26
votes
3
answers
11k
views
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 ...
0
votes
1
answer
816
views
Using the Maven classifier as a dependence
I have a bunch of projects in a workspace where each project has its own pom.xml which generates its own zip with a classifier called foo using the maven-assembly-plugin as below:
<plugin>
...
2
votes
1
answer
1k
views
Maven dependency:get get LATEST ignore repositories from settings.xml
I'm trying to download the last snapshot version from my remote repository (Artifactory. To do that, I'm using the following command:
mvn dependency:get \
-Dartifact=com.acme:my-application:LATEST:...
0
votes
0
answers
123
views
How to extrapolate RELEASE or LATEST version from maven repository?
With this command I copy a single file out of artifactory:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:copy
-Dartifact=com.example:blah:RELEASE:war
-DoutputDirectory=/tmp -Dmdep....
0
votes
1
answer
490
views
APIs for maven dependency
Are there any API that helps to find dependency of maven packages.
I used the examples present in the answer of Programmatically resolving Maven dependencies outside of a plugin - get ...
0
votes
0
answers
194
views
Maven Dependency Analyze complains about CDH dependencies Hadoop-Client and Hadoop-Common
In my hadoop project, I have decided to use only one CDH dependency 'hadoop-client' as suggested by this stackoverflow post.
This is my dependency in the POM:
<dependency>
<groupId&...
0
votes
0
answers
109
views
Maven - How to get rid of the module version in the module name?
I have a pom for a couple of modules. When checking one of the files of this module:
./sources/target/build/xxxxx/xxxxx-2.13-jar-with-dependencies.jar
./compiled/target/build/xxxxx/xxxxx-2.13-jar-...
1
vote
1
answer
2k
views
How do I update Maven to get dependencies from https://repo1.maven.org?
I'm trying to use mvn dependency:get to download a JAR, but I'm getting the error below when I try it.
The critical part of the error message seems to be:
Access denied to: https://repo.maven.apache....
1
vote
1
answer
3k
views
maven-dependency-plugin: exclude .jar files
I am using maven-dependency-plugin. I need to download only a ZIP file and exclude all jar files.
Plugin configuration looks the following way.
<execution>
<id>copy-dependencies</...
5
votes
1
answer
901
views
Maven-dependency-plugin and annotations with SOURCE RetentionPolicy
In a mvn project where I am utilizing maven-dependency-plugin to detect unused dependencies, there is seemingly no dependency scope I can specify for Google's AutoValue (com.google.auto.value:auto-...
9
votes
3
answers
11k
views
How to output a simple list of Maven dependencies
I'm trying to get a simple, machine-parsable list of dependencies from my POM. If I do:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:list -f sample.pom
I get a load of pointless [INFO] ...
1
vote
1
answer
206
views
How to download the souce of jars to custom location in maven?
This is follow up post of How to get all the specified jars mentioned in the pom.xml and transitively dependent jars?
Except that I am looking to download the source of the both dependent and ...
1
vote
0
answers
41
views
Errored Maven dependencies
My dependencies issues:
My Maven Errors:
There are around 114 unresolved dependencies showing.
But I see all those dependencies jars under .m2/repositories
Could this be eclipse or maven version ...
2
votes
1
answer
2k
views
maven missing multiple artifacts when using ejb-jee6-was archetype from com.ibm.tools.archetype group
I'm trying to create new project using ejb-jee6-was archetype but after project has been created get the following error:
Multiple annotations found at this line:
- Missing artifact com.ibm....
0
votes
0
answers
602
views
Alternative to maven codehaus
My maven project uses codehaus [ https://www.codehaus.org/termination/ ] repositories. But these services are terminated and they suggested to do something for the alternative ( Alternate artifacts or ...
3
votes
1
answer
2k
views
Maven Dependency Plugin: Copy only test dependencies
I have already assembled all runtime dependencies for my project in one output directory using the Maven Dependency plugin. Now I would like to assemble all additional test dependencies in a separate ...
44
votes
5
answers
19k
views
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:...
5
votes
3
answers
7k
views
How do I get an aggregated list of external dependencies of my maven project?
I have a large multimodule maven project that has a large number of dependencies. I would like to generate a complete, duplicate-filtered list of third-party dependencies (that is, all dependencies ...
0
votes
1
answer
10k
views
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
Given the below pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven....
0
votes
1
answer
2k
views
How do I unpack AAR dependency classes in Maven?
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 ...
5
votes
2
answers
2k
views
Maven assembly plugin: how to include provided dependencies of transitive dependencies
It seems that including direct dependencies with provided scope is well understood. It also appears that including transitive dependencies with runtime scope is also easily accomplished.
But how can ...
2
votes
1
answer
2k
views
Maven multi-module project - copying all dependencies into a single tar.gz
I'm looking to pull all of the dependencies from each module of my maven project and stick them into a single tar.gz file using the maven-assembly-plugin.
I currently have a pom setup as a parent to ...
0
votes
0
answers
160
views
Which URL was used by usage of maven-dependency-plugin?
I am using the maven-dependency-plugin to specify some artifacts for download.
I know from the artifact the Group ID, the Artifact ID and the Version.
The plugin itself will find it “somewhere”.
...
0
votes
0
answers
55
views
maven-dependency-plugin:generate-resources:unpack-dependencies - strip file's qualified name to absolute name
maven-dependency-plugin,
phase : generate-resources
goal : unpack-dependencies
I want all resolved files with absolute name instead of qualified name.
Any help please?
2
votes
1
answer
855
views
Why does a test scope dependency add compile scope dependencies?
Why does adding the following result in compile scope dependencies?
<dependency>
<groupId>myproject.core</groupId>
<artifactId>api</artifactId>
<classifier>...
2
votes
1
answer
2k
views
TwelveMonkeys 3.1.1 || 3.1.2 not working with maven-dependency-plugin
I am trying to use TwelveMonkeys in my application to deal with thumbnail generation. Also, I am using maven-dependency-plugin to unpack all dependencies and create a FAT jar. Though, plugin work ...
1
vote
1
answer
5k
views
_remote.repositories prevents maven from resolving remote parent
I have my company parent pom in releases repository on a company Nexus instance.
I have mirror settings of <mirrorOf>external:*,!central</mirrorOf>, I don't want to proxy central since ...
0
votes
2
answers
1k
views
How to depend on this maven project
My projects consists of three sub-projects, and my parent pom looks like:
<groupId>com.bwort.core</groupId>
<artifactId>bwort</artifactId>
<packaging>pom</packaging&...
0
votes
1
answer
803
views
Java maven-dependency-plugin ClassNotFoundException at runtime
I am using TwelveMonkeys library (com.twelvemonkeys.imageio:imageio-tiff:3.1.1) in my project. Also, I am using Maven with maven-dependency-plugin to build my project and I am configuring it like this:...
0
votes
0
answers
46
views
Maven jar compiling
I have two projects in my Eclipse A and B, A depends on B, so I added a section of ... to A's POM.xml. Locally, it works fine. I can run A which uses classes from B. However, In my Jenkins continuous ...