Reputation: 1177
Studying spring-project example, i have found a code fragment:
<!-- HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
It works fine there, but when I tried to add the same fragment into my pom.xlm, I got [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-entitymanager:jar is missing.
Give me explanation, why it works here https://github.com/spring-projects/spring-petclinic/blob/master/pom.xml, but doesn't work in generic pom.xml.
Upvotes: 0
Views: 116
Reputation: 3914
This is becasue it uses <dependencyMangement>
to import platform-bom
which is essentially a POM artifact which defines the default dependencies.
Maven using it to resolve the Hibernate dependency's version (Maven must know the 3 GAV properties to identify the artifact).
Upvotes: 1