You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.1 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Getting started

Stable releases

Simply put ravendb dependency to your pom:


Create new maven project

Sample pom:

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">



Please note that plugins section contains net.ravendb.querydsl.RavenDBAnnotationProcessor. As Java does not have LINQ, all definitions of indexes/transformers must be created using strings. Alternatively, you can use the Studio to create indexes/transformers, yet you can also use QueryDSL for strongly-typed querying. In order to use QueryDSL you have to mark your entities with @QueryEntity annotation and enable code generation in pom.xml.

public class Category {
  private String id;
  private String name;
  private String description;
  public String getId() {
    return id;
  public void setId(String id) { = id;
  public String getName() {
    return name;
  public void setName(String name) { = name;
  public String getDescription() {
    return description;
  public void setDescription(String description) {
    this.description = description;

After doing this you can use strongly-typed syntax.

QCategory c = QCategory.category;
    List<Category> candies = session

Unstable releases

RavenDB Client Unstable is available as snapshot in daily-builds S3 maven repository.


Embedding repositories in pom is not a good practice, although it allows a quick start. Please consider moving repositories into ~/.m2/settings.xml. More information can be found here.