Questions tagged [maven-dependency]

A dependency in Maven is a required external library the project depends upon to build and run correctly.

A dependency in Maven is a required external library the project depends upon to build and run correctly. In Maven, dependencies are declared via GAV coordinates (Group id, Artifact id, Version), they could also optionally have a scope, a classifier, a type.

An example of dependency:

<dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <version>4.11</version>
   <scope>test</scope>
</dependency>

Check the official Maven quick-start guide on how to use external dependencies for a first look at it.

More Info

224 questions
366
votes
5 answers

Maven: Command to update repository after adding dependency to POM

I've added a new dependency to my POM. Is there a simple command I can run to download this dependency to my repository?
DJ180
  • 18,724
  • 21
  • 66
  • 117
55
votes
1 answer

Maven dependencies - version vs updates

mvnrepository usually lists "version" and "updates" for each dependency. If I'm publishing my own package, how do I specify the "updates" version Which dependancy does Maven used when resolving transitive dependencies? So if my package depends on…
EugeneMi
  • 3,475
  • 3
  • 38
  • 57
40
votes
5 answers

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:maven-plugin:2.0-alpha-5-SNAPSHOT [INFO] +-…
27
votes
4 answers

Systematic approach with Maven to deal with dependency hell

I'm struggling with how to approach jar dependency hell. I have a Maven-IntelliJ Scala project that uses some aws sdk's. Recently adding the kinesis sdk has introduced incompatible versions of Jackson. My question is: how do I systemically approach…
worker1138
  • 2,071
  • 5
  • 29
  • 36
26
votes
2 answers

Maven - Multiple version of same dependency

I have a web application in which the dependencies pull in two jars called: javassist-3.9.0.GA.jar javassist-3.20.0-GA.jar when I package the WAR I have both of these in the WEB-INF/lib directory, my question is that the application is running and…
Toseef Zafar
  • 1,601
  • 4
  • 28
  • 46
21
votes
1 answer

Jenkins building a product consisting of many Maven projects? (with Jenkins Pipeline plugin?)

We have a product that consists of many Maven projects that depend on each other. All of these Maven projects come together in a single project which delivers the end product. The Maven projects share the same life cycle. In other words, they are…
15
votes
1 answer

Access maven property using dependency management

I am using maven's dependency-management to import the POM into my project Y as below: com.abc X
jack
  • 435
  • 1
  • 4
  • 12
15
votes
3 answers

How to find the minimum JDK version of a specific version of maven dependency?

Now I use the JDK1.5 to develop the program, so I have to guarantee the maven dependencies I want to use are compatible with the JDK 1.5 . Sometimes, latest version needs jdk higher than 1.5 but older version may fit. But how to find the minimum…
Germinate
  • 2,008
  • 2
  • 14
  • 23
14
votes
6 answers

How to work with selenium-chrome-driver in Maven without ChromeDriver.exe

I add the below dependency and code for Opening Chrome,but browser is not opening. org.seleniumhq.selenium selenium-chrome-driver 2.50.0 My code :- package…
12
votes
1 answer

How to ignore Maven dependency-check failure on missing nvd file

I tried to perform a release of my project today using the Maven release plugin. It failed due to the dependency-check-maven plugin's attempt to download the 2020 version of the CVD file, which hasn't yet been uploaded: Unable to download meta…
Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
12
votes
1 answer

Understanding eclipse maven dependency hierarchy

I want to understand the dependencies for a multi-module maven project and for that referred to eclipse dependency hierarchy. I did understand fairly, however some of the things I am not able to understand at all. Below is the screen shot. The…
CuriousMind
  • 8,301
  • 22
  • 65
  • 134
12
votes
1 answer

Spring SAML: Could not find artifacts while using as maven dependency with version 1.0.4.RELEASE

I am trying to use spring-security-saml2-core-1.0.4.RELEASE as maven dependency for my project and encounter two issues when mvn install: Failure "Could not find artifact xml-apis:xml-apis:jar:1.4 ... ". I have not found 1.4 version of xml-apis…
Artur Yakubenko
  • 129
  • 1
  • 1
  • 8
11
votes
1 answer

java.lang.NoSuchFieldError: INSTANCE in bitpay SDK

I want to implement this code public void testGetExchangeRate() throws Exception { ECKey key = KeyUtils.createEcKey(); String clientName = "server 1"; BitPay bitpay = new BitPay(key, clientName); if…
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
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
7
votes
2 answers

Maven: ensure same major parent pom version in multi-project development

Our team has multiple projects; most projects are just libraries. Let's assume for simplicity that the libraries don't depend on each other and there is a single project that uses them, e.g.: Project Main: Project Lib-A: X (3rd-party…
Alexander
  • 2,761
  • 1
  • 28
  • 33
1
2 3
14 15