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
4 answers

Issue in accessing jacob-1.18-x86.dll at run time

Problem in resolving jacob-1.18-x86.dll , it cannot accessed at run time while i can successfully compile program. SEVERE: Servlet.service() for servlet dispatcher threw exception java.lang.UnsatisfiedLinkError: no jacob-1.14.3-x64 in…
1
vote
4 answers

SimpleIdentifiableResourceAssembler cannot be resolved to a type

I am following this tutorial: Spring HATEOAS - Basic Example And I have a spring boot project with the following dependencies: org.springframework.boot
Manuel
  • 205
  • 1
  • 4
  • 17
1
vote
0 answers

Using both kafka 2.10 and 2.11 in one project (one for test)

I have a maven project that uses another package that uses kafka client version kafka_2.10. In the test of my project, I'd like to use kafka_2.11 because all our other projects use kafka_2.11 and we have some code that I can reuse. The desired…
breezymri
  • 3,975
  • 8
  • 31
  • 65
1
vote
4 answers

Using Java project as jar file in other project as maven dependency

I want to use one maven project as dependency using POM.xml in other project with few limitations. My Maven project1 is framework project. I have created a jar file for that project. This project will reside in a private git repo. I donot want to…
Sadiq Shaik
  • 43
  • 1
  • 5
1
vote
1 answer

Listing maven dependencies in a directory

I want to get all the maven dependencies list for a directory containing multiple projects. I can go inside each project and use command mvn dependency:tree and consolidate all of them manually. Is there anyway (script or command) i can get…
1
vote
1 answer

Maven Dependency jar for BuildPluginManager

In my maven plugin Mojo Java file, I am importing interface BuildPluginManager using following line: import org.apache.maven.plugin.BuildPluginManager; This line gives following error: [ERROR] COMPILATION ERROR : [INFO]…
dc95
  • 1,319
  • 1
  • 22
  • 44
1
vote
1 answer

Maven NAR Dependency - Could not resolve dependencies

My Dependencie is built as a nar(which contains java files and a jni wrapper) jni jni 1.0.0-SNAPSHOT now If I do mvn clean package it…
user2071938
  • 2,055
  • 6
  • 28
  • 60
1
vote
2 answers

Import maven dependecies from a Spring Boot 1.4 application

I have troubles with importing classes from an existing Spring-Boot application into my new application after they changed the structure of the build jar file. They changed the jar-file so that the applications own classes now are located in…
runesr
  • 43
  • 4
1
vote
2 answers

whats the use of the dependencies in the plugin element on a pom.xml

I've see you can add dependencies element of the plugin element in a pom. Question: What's for? Should'nt all the lib used by a plugin be include inside it? Do it surcharge some lib used by the plugin?
sab
  • 4,352
  • 7
  • 36
  • 60
1
vote
0 answers

IntelliJ + Maven: How to see what depends on a module

I'm new to Java and Maven, so the premise of the question may be a little shaky. I'm working on a complicated Java project that uses Maven, and IntelliJ is my IDE. To build the entire project, it takes like 25 minutes (yes, it's big). What I really…
Matt
  • 23,363
  • 39
  • 111
  • 152
1
vote
3 answers

How do I resolve dependency conflict for a Java file in IntelliJ IDEA?

I have tried to search web for the problem I am facing but maybe I am not asking google the right question so here I am. I am using IntelliJ IDEA for my multi-module project. For one of my modules, one of the class file is using a static import -…
1
vote
1 answer

How to create a single library jar from maven project with multiple submodules?

I have a quite large java maven project with over 200 modules, it is OK as is. I am trying to merge all of those modules to single jar. In some cases it would be very handy to declare just one new maven dependency eg.…
pasuna
  • 1,405
  • 2
  • 15
  • 21
1
vote
2 answers

Spring Tool Suite Closes Automatically after adding dependency to pom.xml file

I am trying to use Spring Data but whenever I add its dependency to pom.xml, after 5-10 seconds, STS closes automatically. If I remove the dependency, it works. But, I need to use Spring Data in my project. What should I do? Expert help needed. I'm…
Anish Panthi
  • 797
  • 8
  • 17
1
vote
1 answer

Arquillian testing: cannot remove dependencies to slf4j from the embedded glassfish

I'm creating a java EE integration test suite with arquillian and junit in a multi pom maven project. In the main pom I am including both the embedded glassfish required by arquillian and the slf4j library required by my project. The embedded…
Gabber
  • 5,152
  • 6
  • 35
  • 49
1
vote
1 answer

Which is my spring-boot-starter-tomcat dependency

I'm developing a web application with Spring-boot and it's all been working quite well. I've been editing and testing it on my browser like it's been deployed to a server. But now I want to generate my war file, and according to Spring's…
Henrique Ordine
  • 3,337
  • 4
  • 44
  • 70