If you’re using GemFire in your software, there’s a good chance you’d like to build it using Maven. GemFire is hosted in a Maven repository but the details don’t seem to be documented, so this post is a bit of a “Missing Manual” entry.
It’s pretty easy, you need to set up the GemFire repository and add it as a dependency in your pom.xml.
<repositories> <repository> <id>gemstone</id> <url>http://dist.gemstone.com.s3.amazonaws.com/maven/release/</url> </repository> </repositories>
<dependency> <groupId>com.gemstone.gemfire</groupId> <artifactId>gemfire</artifactId> <version>6.6</version> </dependency>
If you want to see all the versions of GemFire available you can on the repo root page.
I used this in the course of putting together a Continuous Query client for GemFire, which lets you run SQL-like queries against GemFire that returns matches in real-time as data enters GemFire. So you can run something like “SELECT * from /myregion WHERE totalsale > 100″ and any time an object is inserted into GemFire that has a totalsale value greater than 100 you’re immediately notified of it. It’s pretty interesting and the client is a nice way to interactively discover the system’s capabilities.
One other thing that might not be totally obvious is that GemFire is free for development use, there is a non-expiring license to use it for up to 3 connections (clients or members in the distributed system), so feel free to try it out, play around give feedback.