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
0
votes
0 answers

Maven build is failing with error could not find artifact

I have a project demo-parent which contains 2 subprojects child1 and child2. demo-parent is building a pom. child1 and child2 are building one jar each. And all these are getting uploaded to the artifactory. demo-parent(also used flatten…
Shivansh Kumar
  • 321
  • 1
  • 5
  • 16
0
votes
1 answer

I am not able to find maven dependency of tdmext.jar

I am converting an old java project to a spring boot project. The old project was using tdmext.jar for which I am not able to find maven dependency for that jar.
Giriraj
  • 1,251
  • 1
  • 7
  • 10
0
votes
0 answers

Build maven Artifacts for different environments via Jenkins

We have 5 enviornments, DEV, SIT, UAT, PT, PROD. We want the flexibility to deploy different code in different environments. So we created 5 branches on GitHub. The issue we are facing is in distinguishing the artifacts. We only have one build…
0
votes
1 answer

Maven dependency: import cannot be resolved but is present in local repository (Eclipse Oomph Unzip Setup Task)

I have problems using Maven. A Maven mvn clean package of the submodule "task-unzip" from the Eclipse Oomph's Unzip Setup Task repository (https://github.com/maybeec/oomph-task-unzip) fails with the following error on several…
J. Doe
  • 142
  • 1
  • 14
0
votes
0 answers

expected='endstream' actual='' at offset 369250" rror occurs in some pdf

I used 1.8.10-alfresco patched pdfbox version and I also tried 1.8.8. And it will also work fine in some pdf. org.apache.pdfbox pdfbox ${pdfbox.version}
Rekha Ahir
  • 13
  • 4
0
votes
0 answers

Issue with external jar having AutoValue generated classes

I have a "jar-a" which has AutoValue generated class files. When I add that jar as external library to another maven project, those autovalue generated classes are not appearing and when I run my project I get java.lang.NoClassDefFoundError. Is this…
0
votes
0 answers

Maven Dependency not available | Exists in local .m2 Repository | Building using Eclipse

Why is following dependency shown as missing by maven as i have added jar to local repository? Dependency to include: com.hcsc.aom2 aom2-read-write-cts3-impl
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
0
votes
2 answers

How to use Lambok dependency in SpringBoot?

I have just added Lombok dependency to my SpringBoot project so I don't have to repeat lines of getters, setters and constructors... Here is my code…
user9347049
  • 1,927
  • 3
  • 27
  • 66
0
votes
2 answers

using one maven project into another maven project

I have two maven projects, testmvn mvnusedemo testmvn: com.avs testmvn 0.0.1-SNAPSHOT testmvn mvnusedemo: com.avs
0
votes
1 answer

Spring Boot microservices dependency

In my project I have a lot of microservices. Some of the microservices are dependent on each other. for e.g. microservice X is dependent on microservice Y and currently I have that dependency in microservice X's pom.xml as below: (microservice…
sidd
  • 195
  • 3
  • 20
0
votes
1 answer

Can't extract module name from Ab.jar: Main.class found in top-level directory (unnamed package not allowed in module)

This is my first time using maven and I am trying to make a Chat bot using program-ab implementation which is hosted on https://code.google.com/archive/p/program-ab/ and I have been following https://howtodoinjava.com/ai/java-aiml-chatbot-example/…
0
votes
3 answers

IntelliJ- Adding testNG maven dependency brings junit

In the POM file when I add the testng dependency, I never get the option to import testng. I only get Junit. I do not have Junit as dependency. org.testng testng
Sheikh Rahman
  • 895
  • 3
  • 14
  • 29
0
votes
0 answers

Why IDEA import mockito last dependency version which contains old version subdependencies?

I am trying to get the mockito-junit-jupiter 3.4.4 which according to the https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter/3.4.4 contains mockito-core 3.4.4 and junit-jupiter-api 5.4.2, but in IDEA in Maven Tab…
dubnic
  • 65
  • 1
  • 1
  • 7
0
votes
0 answers

How can I make a maven build fail if a dependency has a dependency on a sibling of the current project?

Imagine I have the follwoing project structure: a -> a-api a-impl b -> b-api b-impl And I want the build to fail when there is a dependency "cycle" because b-impl depends (transitively) on a-api and a-impl depends on b-api (note that…
0
votes
0 answers

Using class from another project in java

I am working on a java project A which is using a class from project B. I added project B in the build path of Project A, I am getting error at compile time for the classes I have used from project B but when I run project A it is showing error…