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
3
votes
1 answer

MapStruct dependency scope in a Maven project

MapStruct generates code at compile-time and it should not require any runtime dependencies: How is MapStruct different from other bean mapping tools? Unlike most other bean mapping tools, MapStruct doesn’t work at runtime but is a compile-time…
Danilo Piazzalunga
  • 7,590
  • 5
  • 49
  • 75
3
votes
1 answer

Unable to use Maven dependency inside my Spring boot project

I have published my artifact to Maven. Can be accessed here -> https://oss.sonatype.org/#nexus-search;classname~AccessGateLabs Thereafter, I have added the dependency, com.accessgatelabs.oss
ekansh
  • 716
  • 8
  • 16
3
votes
1 answer

What is the difference between the Selenium Maven artifacts selenium-api and selenium-support within the Maven Repository?

I am seeing the following dependencies under Maven repository selenium-java selenium-api selenium-support selenium-server selenium-Firefox-driver and so on. Link : https://mvnrepository.com/artifact/org.seleniumhq.selenium While I understand…
3
votes
0 answers

Use Maven dependency with special characters in artifactId

I want to add a Maven dependency that's hosted on the JitPack repository. The artifactId contains dots and, therefore, cannot be downloaded due to issues within JitPack's infrastructure. The workaround is to replace . with ~. But Maven forbids the…
mike
  • 4,929
  • 4
  • 40
  • 80
3
votes
1 answer

Maven dependency resolution between modules during a multi-module project build

I faced with some Maven behavior that I was not expected before. For example we have multi-module project A: A | --- api --- impl impl module uses api as a dependency: examle
Aliaksei Bulhak
  • 6,078
  • 8
  • 45
  • 75
3
votes
2 answers

java.lang.NoClassDefFoundError: io/netty/handler/ssl/SslContextBuilder

I am trying to implement relayrides/pushy, but am getting the following runtime error: Jun 28, 2017 2:06:58 PM com.turo.pushy.apns.SslUtil getSslProvider INFO: Native SSL provider not available; will use JDK SSL provider. Exception in thread "main"…
Richard
  • 8,193
  • 28
  • 107
  • 228
3
votes
0 answers

Why is Maven persisting corrupt dependency jars in local repository in a multi-threaded build?

I'm running into following error frequently [BuilderThread 4] [WARNING] error reading /opt/jenkins/maven-repositories/0/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar; zip file is empty The missing/corrupt jar…
phanin
  • 5,327
  • 5
  • 32
  • 50
3
votes
1 answer

Why 'mvn install' war projects?

My maven project packages a war, which only gets deployed and is itself not a dependency to other projects (in other words is a final deployable). Questions: is there any reason to ever run mvn install on that package, which, in addition to mvn…
amphibient
  • 29,770
  • 54
  • 146
  • 240
2
votes
1 answer

Addressing critical vulnerabilities in Maven dependencies

I'm working on a Java Jersey application. In my pom.xml file, I've included certain Maven dependencies that have critical vulnerabilities. Even after upgrading to the latest versions, some of these dependencies still exhibit critical…
2
votes
0 answers

Should we use or to manage versions in Maven?

There are 2 ways to manage versions in multi-project solutions, e.g. Java project with microservices: Dependency management In parent pom.xml you define a long list of depencies used across child projects
Politechniczny
  • 453
  • 3
  • 13
2
votes
0 answers

Unable to create a Connection with Jira - JiraRestClient

I am trying to create a JiraRestClient using Basic authentication. JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory(); URI jiraServerUri = new URI("*"); try (JiraRestClient restClient =…
2
votes
2 answers

What is the difference between maven surefire plugin and maven surefire dependency

Maven Surefire Plugin [...] org.apache.maven.plugins maven-surefire-plugin 3.0.0-M6 [...] Maven Surefire…
2
votes
0 answers

Cannot import dependency from external repository (Azure Artifact)

I am coming to you because it's been almost 5 hours that I am struggling on importing my packaged spring boot application deployed to Azure Artifacts (Maven repository). I am using intellij IDEA with JDK 11, intellij is able to autocomplete the…
2
votes
1 answer

How can I add Telosys repos as Maven dependencies?

Im trying to add telosys as a maven dependency but Im enable to do it because its not published on Maven Central. I also tried to use jitpack but it doesnt work. Is there any way to do this? Telosys Organization :…
Pedro Araujo
  • 57
  • 1
  • 7
2
votes
1 answer

Maven : "Caused by: java.lang.NoClassDefFoundError: com/omnesys/omne/om/OMN"

I want to add 3rd party external jar into my maven repository. My project is in Spring Boot. Error : `Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) …
vijayk
  • 2,633
  • 14
  • 38
  • 59
1 2
3
14 15