Getting Started

The recommended way to get started using Morphia in your project is with a dependency management system such as maven or gradle. To use Morphia using either build tool, you will need to update your build configurations with the following information.


If you want to use a -SNAPSHOT build you will need to add the appropriate repository information to you pom:

        <name>Sontatype Snapshots</name>

Gradle users can use the following dependency declaration:

dependencies {
    compile 'dev.morphia.morphia:morphia-core:2.1.7'

And, of course, to use -SNAPSHOT builds, the additional repository will be needed:

repositories {
    maven {
        url ''

Morphia 2.0 requires Java 11 or greater. Morphia has been tested on mongodb servers as old as 3.6.15 up through the most recent builds. Morphia will likely work on older servers versions but those remain untested and no guarantees are made.