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
1
vote
1 answer

Cannot resolve com.palantir.docker.compose:docker-compose-rule-junit4:0.32.0

Trying to drag this dependency from maven but get error, what could be the issue? Cannot resolve com.palantir.docker.compose:docker-compose-rule-junit4:0.32.0 com.palantir.docker.compose
Alexander
  • 39
  • 4
1
vote
0 answers

Could not transfer artifact ... Authorization failed for .... 403 Forbidden - How to fix this error in InteliJ?

I am trying set a repository in InteliJ and while downloading the Maven dependency, getting the following error: Could not transfer artifact xyz.abc.pqr.abcdefgh:pom:15.5.5 from/to abcdefgh-maven-repository…
Soumik Das
  • 156
  • 11
1
vote
1 answer

Maven dependency:tree doesn't show all transitive dependencies

I was trying to parse some dependency trees via maven dependency:tree, and found some interesting cases: I made a pom.xml to install org.glassfish.jersey.containers:jersey-container-servlet:2.19, here is the content:
1
vote
1 answer

Maven dependency incompatible library class

My application is defined with an external library jar dependency com.lib Encoder It has two versions 1.0 and 2.0. A class owned in the library got updated in its…
Sats
  • 1,061
  • 9
  • 12
1
vote
0 answers

Cannot resolve maven microsoft sqlserver jre8 dependency

I am new to maven and my main, recuring, issue is having dependencies to be resolved. In my pom file:
Milan
  • 1,547
  • 1
  • 24
  • 47
1
vote
0 answers

Maven update remove Maven dependencies from Deployment Assembly

Every time I update this maven project I have to add again Maven dependencies to the Web Deployment Assembly. Why that happen, and how could that be avoided?
Matteo_B
  • 51
  • 8
1
vote
1 answer

Absent Code attribute in method that is not native or abstract in class file javax/ejb/EJBTransactionRolledbackException Error while Test a method

I've tried to test an EJB class whith JUnit but I gave this error : java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ejb/EJBTransactionRolledbackException I've added follow dependencies: …
1
vote
1 answer

Maven depedency for opencv_contrib

I have searched and tried many dependencies, but noone of the tried could help me load the OpenCV Face module correctly. Is there one? Or I have to import it locally?
1
vote
0 answers

project.basedir issue in Maven, jar not referred

I have jar file in my project home folder and I try to provide those jar details in pom.xml , but looks like its not referring jar location - src/main/resources/lib/apache-commons-lang.jar Here is my maven code :
aruntheimperfect
  • 231
  • 1
  • 3
  • 11
1
vote
1 answer

Maven Dependency Issues: Provided and Compile dependencies working together

I have inherited a maven project with dozens of "provided" scoped dependencies. I am working on inserting a new dependency that is itself dependent on one of the previously mentioned, "provided" dependencies. This new dependency is scoped with the…
Chad Van De Hey
  • 2,716
  • 3
  • 29
  • 46
1
vote
1 answer

Maven3 : How to get all the project dependencies in a Custom Maven Extension

In Maven 3.x , how I can get all the dependencies of a project including the transitive in a custom maven extension (By not using Aether) Currently I have this : @Component(role = AbstractMavenLifecycleParticipant.class, hint = "Test") public…
h-kach
  • 351
  • 2
  • 8
  • 25
1
vote
1 answer

Scan multiple maven poms for different dependency versions

I have different maven projects to maintain and would like to aligned the used versions of the dependencies. My goal would be to scan all the POMs (they are not necessary parent/child poms) for their dependencies and if there is a dependency to the…
PaulEdison
  • 897
  • 1
  • 15
  • 36
1
vote
2 answers

Maven resolves wrong dependency version

Our warfile contains not the expected SNAPSHOT-Version of a jarfile, it contains an older release version via another dependency. Simplified dependency:tree war-x.x.x-SNAPSHOT \- jar1-x.x.x-SNAPSHOT +- jar2-x.x.x | +- problemjar-x.x.x +-…
Gunnar
  • 383
  • 4
  • 18
1
vote
0 answers

Using mvn get to pull latest artifact from Nexus repository

I am trying to pull the latest artifact from my Nexus repository. I am using the get command to pull the artifact. mvn dependency:get -Durl=http://nexus-repository:8080/nexus/content/repositories/snapshots…
Robert
  • 10,403
  • 14
  • 67
  • 117
1
vote
1 answer

Maven project dependency

Currently I have 3 maven projects: ProjectCommon _______|________ | | ProjectA ProjectB Resulting on this 3…
Beto Neto
  • 3,962
  • 7
  • 47
  • 81