Installation

The installation of Criteria4JPA is straight forward. Criteria4JPA has no library dependencies and no setup work has to be done except of adding the JAR file to your classpath.

Setup with Maven

Criteria4JPA is available in the Maven Central Repository. All you have to do is adding this dependency to your pom.xml:

<dependency>
  <groupId>org.criteria4jpa</groupId>
  <artifactId>criteria4jpa</artifactId>
  <version>0.2</version>
</dependency>

Please note that Criteria4JPA has only a provided scoped dependency to the Java Persistence API.

Other build systems

If you are using any other build system for your project you will have to manually download the required JAR file and add it to your classpath.

You can always find the current version of Criteria4JPA on the Download Page.

Development snapshots

If you want to give the current development snapshots a try, you will have to add the Sonatype OSS repository to your pom.xml like this:

<repositories>
  <repository>
    <id>sonatype-oss-public</id>
    <name>Sonatype OSS Public Repository</name>
    <url>http://oss.sonatype.org/content/groups/public/</url>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

Now you can add the current Criteria4JPA snapshot version to your dependencies:

<dependency>
  <groupId>org.criteria4jpa</groupId>
  <artifactId>criteria4jpa</artifactId>
  <version>0.3-SNAPSHOT</version>
</dependency>