Maven - Interview Questions and Answers for 'Dependencie' | Search 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 'Dependencie' - 8 question(s) found - Order By Rating

 Q1. If Project A is calling web service of project B and there are some changes in project B, Will Project A needs to be rebuilt ?Maven
Ans. That depends if the interface for the resource in Project B gets changed. If only the internal implementation is changed, No change is required in Project A. Project A is not even required to be rebuilt.

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

   Like         Discuss         Correct / Improve     project dependencies


 Q2. What would you do if you have to add a jar to the project using Maven ?Maven
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
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. What is a transitive dependency ? Can we override Transitive Dependency version and If Yes, how ?Maven
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


 Q5. What are the benefits of transitive depency in Maven ?Maven
Ans. Transitive dependencies allows to avoid specifying the libraries that are required by the project which are specified in other dependent projects - Remote or Local.

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

   Like         Discuss         Correct / Improve     maven   maven repository   dependencies   transitive dependencies   build management


Usually asked to experienced developers.
 Q6. What is a cyclic dependency ?Maven
Ans. A has dependency of B, B has dependency of C and C has dependency of A

With Maven 2 , came transitive dependency wherein in above scenario, C will acts as a dependency of A as if this dependency has been defined directly in A but the negative side is that if it leads to cyclic dependency , it creates problems.

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

   Like         Discuss         Correct / Improve     maven   dependencies   cyclic dependencies   transitive dependencies   build management     Asked in 1 Companies        frequent


 Q7. How do I determine which POM contains missing transitive dependency?

a. mvn -A
b. mvn -M
c. mvn -R
d. mvn -X
Maven
Ans. mvn -X

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

   Like         Discuss         Correct / Improve     maven   maven transitive dependencies


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

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

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

   Like         Discuss         Correct / Improve     maven   maven dependencies


 Q9. 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: