Maven - Interview Questions and Answers for 'Transitive dependency' | 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 'Transitive dependency' - 2 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


Related Questions

  Why do we need Inner classes ? Cant we just work with outer classes wherever we implement Inner classes ?
  Difference between first level and second level cache in hibernate ?
  What are the benefits of using Spring Framework ?
  What things should be kept in mind while creating your own exceptions in Java?
  Difference between C++ and Java ?
  Difference between SAX and DOM Parser ?
  How to implement an immutable class ?
  Difference between Factory and Abstract Factory Design Pattern ?
  What are various types of Class loaders used by JVM ?
  What things you would care about to improve the performance of Application if its identified that its DB communication that needs to be improved ?


 Q2. How do you resolve Maven Dependencies issue while upgrading dependencies versions ?Maven2016-11-11 15:06:45

Ans. Step 1 - Upgrade the required dependency , perform build and check build errors

Step 2.1 - If the error is of missing transitive dependency ( which is rare and means that the previous version has a dependency which is missing in the later version ), I would look for the dependency in google and hence will include it as direct dependency in Pom file.

Step 2.2. If the error is for Duplicate dependencies , and the choice is between transitive and direct dependency, I usually remove the direct dependency.

Step 2.3 - If the error is for Duplicate dependencies , and both are transitive dependencies. I first make a choice ( usually later version ) and then ignore the previous version dependency.

Step 2.4 - If the error is for Duplicate dependencies , and there are more than 2 duplicates, I usually ignore it by specifying within maven-enforcer-plugin config.

Step 3 - Perform a Clean Build.

Step 4 - Check Maven Dependency Tree to make sure that Duplicates have been removed or dependency is there in case of missing dependency.

Step 5 - Perform tests and make sure that there are no runtime problems.

Step 6 - If there are runtime problems ( which very likely occurs if you have different version dependencies , very likely by doing 2.4 , you will have to remove step 2.4 and alternately perform 2.2 or 2.3 )

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

   Like         Discuss         Correct / Improve     maven  maven dependency  transitive dependency


Related Questions

  What is a transitive dependency ? Can we override Transitive Dependency version and If Yes, how ?
  What is a cyclic dependency ?
  Which of the following is dependency exclusion ?
  Which of the following is not a build tool ?
  What is Maven's order of inheritance?
  What is a Mojo?
  Where do we configure repositories in Maven ?
  What are different type of repositories in Maven ?
  How does Maven looks for a resource ?



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: