0
在我的pom.xml中我已經定義了一個依賴這樣繼承的Maven的依賴版本
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
</dependencies>
沒有指定明確這種依賴的版本。但是,它的工作原理和我有版本1.8.2.RELEASE
。
我知道這可能是因爲繼承而造成的mvn help:effective-pom
,我可以看到spring-data-jpa
的有效版本號。但是我檢查了父pom,我沒有找到spring-data-jpa
版本號的任何定義。
我怎麼能知道其中POM文件 maven已經拿起版本spring-data-jpa
上去的時候繼承樹的遺傳?有沒有一個maven的命令?
MVN dependecy:樹輸出是這樣的:
[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
但在這個輸出沒有相關的POM文件,所以我不知道從哪個POM文件的版本推導。
謝謝,但我看不到哪個POM文件已定義'spring-data-jpa'的版本(1.8.2.RELEASE)。 –
@Gab是好人你可以在你的問題中顯示評論的輸出內容嗎?做oyu有一個春天pom作爲父母pom嗎? – Jens
我有一個spring pom作爲父pom,但是我沒有在其中找到'spring-data-jpa'版本的任何定義。 –