Related Documentation : Integrations : Using Ehcache with Hibernate : Building with Maven
Building with Maven
Dependency versions vary with the specific kit you intend to use. Since kits are guaranteed to contain compatible artifacts, find the artifact versions you need by downloading a kit. Configure or add the following repository to your build (pom.xml):
<repository>
<id>terracotta-releases</id>
<url>http://www.terracotta.org/download/reflector/releases</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
Configure or add the Ehcache core module defined by the following dependency to your build (pom.xml):
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>${ehcacheVersion}</version>
</dependency>
For the Hibernate-Ehcache integration, add the following dependency:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>${hibernateVersion}</version>
</dependency>
For example, the Hibernate-Ehcache integration dependency for Hibernate 4.0.0 is:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>4.0.0</version>
</dependency>
Note:  
Some versions of Hibernate-Ehcache may have a dependency on a specific version of Ehcache. Check the Hibernate-Ehcache POM for more information.
Copyright © 2014 Software AG, Darmstadt, Germany.

Product Logo |   Feedback