Maven - Interview Questions and Answers for 'Maven dependencies' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Maven - Interview Questions and Answers for 'Maven dependencies' - 4 question(s) found - Order By Newest

 Q1. What is a transitive dependency ? Can we override Transitive Dependency version and If Yes, how ?Maven
Admin
info@buggybread.com
Ans. Transitive dependency is the dependencies not defined directly in the current POM but the POM of the dependent projects.

Yes we can override transitive dependency version by specifying the dependency in the current POM.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   maven dependencies   maven transitive dependency   technical lead   build management


 Q2. What would you do if you have to add a jar to the project using Maven ?Maven
admin
info@buggybread.com
Ans. If its already there in Maven local repository, We can add that as a dependency in the project pom file with its Group Id, Artifact Id and version.

We can provide additional attribute SystemPath if its unable to locate the jar in the local repository.

If its not there in the local repository, we can install it first in the local repository and then can add it as dependency.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   maven dependencies   jar   architecture


 Q3. How can we see Dependencies for the project and where exactly they are defined ?Maven
Admin
info@buggybread.com
Ans. Using

mvn dependency:tree

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   maven repository   maven dependencies   dependency tree


 Q4. Which of the following is not a dependency scope in Maven ?

a. Compile
b. Test
c. System
d. Export
Maven
Anonymous
Ans. Export

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   maven dependencies


 Q5. Which of the following is not the dependency scope in Maven ?Maven
a. Compile
b. Runtime
c. Debug
d. Test

Ans.c. Debug


Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: