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 configuration with the following information.

<dependencies>
    <dependency>
        <groupId>dev.morphia.morphia</groupId>
        <artifactId>morphia-core</artifactId>
        <version>2.3.9</version>
    </dependency>
</dependencies>

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

<repositories>
    <repository>
        <id>sonatype-snapshots</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

Gradle users can use the following dependency declaration:

dependencies {
    compile 'dev.morphia.morphia:morphia-core:2.3.9'
}

To use -SNAPSHOT builds, an additional repository will be needed:

repositories {
    maven {
        url 'https://oss.sonatype.org/content/repositories/snapshots'
    }
}

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.