For example, how do I find out the version of Hibernate that the Spring Boot spring-boot-starter-data-jpa
starter dependency is bringing into my project?
A transitive dependency occurs when one non-prime attribute is dependent on another non-prime attribute. If a table schema contains a dependency , where and are non-prime attributes, we say it contains a transitive dependency from to .
transitive dependency that is managed by the parent POM, just add a. version property for that dependency. For this rule to work the parent. POM has to define version properties for all the dependencies that it. manages (the spring-boot-starter-parent does this).
Now Spring Boot Starters provides all those with just a single dependency. The official starters follow a naming convention spring-boot-starter-*, where * denotes application type. For example, if we want to build web including RESTful applications using Spring MVC we have to use spring-boot-starter-web dependency.
If you've not declared a dependency in your pom. xml, but it's appearing in your project, it's being imported somewhere as a transitive dependency. You can see exactly which dependency is importing it, by looking at the dependency:tree report, and walking back up the “tree” to find its parent.
The list of dependencies is available in the Appendix F. of the documentation and in the pom.xml of the spring-boot-dependencies artifact, which you should be able to find on your classpath.
You can also go the public repository of Spring Boot and see the pom.xml for every released version in a separate branch.
When using maven, use the below command to print dependency tree
mvn dependency:tree
http://maven.apache.org/plugins/maven-dependency-plugin/examples/resolving-conflicts-using-the-dependency-tree.html
When using gradle:
gradlew dependencies
dependencies - Displays all dependencies declared in root project 'my-project'.
dependencyInsight - Displays the insight into a specific dependency in root project 'my-project'.
Also, an IDE shows this information in some window. For example, IntelliJ shows all project dependencies in the project window under 'External Libraries' and in the maven window.
To supplement Yuva's answer, if you are looking for hibernate's version, you may run
gradle dependencyInsight --dependency hibernate --configuration compile
or if your project is structured as a multi-project, under project root run
gradle submodule:dependencyInsight --dependency hibernate --configuration compile
The command gives result for what depends on hibernate in this project
whereas gradle dependencies
gives result for what dependencies this project have
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With