Basically I need to update gson to latest version (2.8.9), but as it is not included in POM directly, how can I find out which dependency brings it? In Intellij, in Maven "Dependencies tree" I'm able to manually open them one by one, but is there any automatic way how to do it?
CodePudding user response:
Based on my understanding, you're opening dependencies in maven tab one by one. In terminal tab, run mvn dependency:tree and you'll be able to see entire tree with version details.
CodePudding user response:
Use
mvn dependency:tree -Dincludes=com.google.code.gson:gson
to check for dependencies which bringgson
into your project.Use
<dependencyManagement>
section of the POM to control the versions of artifacts used in transitive dependencies. Just add the following snippet:<dependencyManagement> <dependencies> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.8.9</version> </dependency> </dependencies> </dependencyManagement>