Installation Guide : Building Ehcache from Source
Building Ehcache from Source
This page is intended for users who want to create their own Ehcache or distributed Ehcache build, rather than use the packed kit.
These instructions work for each of the Ehcache modules, except for ehcache-jmsreplication, which requires installation of a message queue. For details, see “Replicated Caching Using JMS” in the Ehcache Replication Guide.
Building an Ehcache Distribution From Source
To build Ehcache from source, perform the following steps.
1. Check the source out from the Subversion repository http://svn.terracotta.org/svn/ehcache/.
2. Ensure that you have a valid JDK and Maven installation.
3. From within the ehcache/core directory, type mvn -Dmaven.test.skip=true install.
Running Tests for Ehcache
To run the test suite for Ehcache, perform the following steps.
1. Check the source out from the subversion repository.
2. Ensure you have a valid JDK and Maven 2 installation.
3. From within the ehcache/core directory, type mvn test.
4. If some performance tests fail, add a -D net.sf.ehcache.speedAdjustmentFactor=x system property to your command line, where x is how many times your machine is slower than the reference machine. Try setting it to 5 for a start.
Java Requirements
*Current Ehcache releases require Java 1.5 and 1.6 at runtime.
*Ehcache 1.5 requires Java 1.4. Java 1.4 is not supported with Terracotta distributed Ehcache.
*The ehcache-monitor module, which provides management and monitoring, will work with Ehcache 1.2.3 but only for Java 1.5 or higher.
Mandatory Dependencies
*Ehcache core 1.6 through to 1.7.0 has no dependencies.
*Ehcache core 1.7.1 depends on SLF4J (), an increasingly commonly used logging framework which provides a choice of concrete logging implementation. For configuration details, see “Logging” in the Ehcache Operations Guide.
Other modules have dependencies as specified in their maven POMs.
Maven Snippet
To include Ehcache in your project, use:
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.3.1</version>
<type>pom</type>
</dependency>
Note:  
Be sure to substitute the version number above with the version number of Ehcache that you want to use.
If using Terracotta Distributed Ehcache, also add:
<dependency>
<groupId>org.terracotta</groupId>
<artifactId>terracotta-toolkit-1.4-runtime</artifactId>
<version>4.0.0</version>
</dependency>
<repositories>
<repository>
<id>terracotta-repository</id>
<url>http://www.terracotta.org/download/reflector/releases</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
Be sure to check the dependency versions for compatibility. Versions released in a single kit are guaranteed compatible.
Copyright © 2014 Software AG, Darmstadt, Germany.

Product Logo |   Feedback