In my pom.xml I have defined a dependency like this
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
</dependencies>
without specifying explicitly the version of this dependency. However, it works and I've got the version 1.8.2.RELEASE
.
I know that it may be because of the inheritance and by mvn help:effective-pom
, I can see the effective version number of spring-data-jpa
. But I checked the parent pom and I didn't find any definition of the version number for spring-data-jpa
.
How can I know in which POM file maven has picked up the version for spring-data-jpa
when going up the pom inheritance tree? Is there a maven command for this?
mvn dependecy:tree output is like this:
[INFO] +- org.hibernate:hibernate-envers:jar:4.2.18.Final:provided
[INFO] +- org.springframework.data:spring-data-jpa:jar:1.8.2.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:1.10.2.RELEASE:compile
[INFO] | +- org.springframework:spring-orm:jar:4.0.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.0.9.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.1.7.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-tx:jar:4.0.9.RELEASE:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.8.6:compile
[INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.12:runtime
[INFO] +- org.springframework.data:spring-data-envers:jar:1.0.8.RELEASE:compile
[INFO] | \- joda-time:joda-time:jar:2.8.2:compile
But there is no related POM file in this output so I cannot know from which POM file the version is deduced.