MongoDB Java Driver

org.mongodb : mongo-java-driver

The MongoDB Java Driver uber-artifact, containing the legacy driver, the mongodb-driver, mongodb-driver-core, and bson

[Website] ·
690 usages

Add dependency in Maven / Gradle

<dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongo-java-driver</artifactId>
    <version>3.12.10</version>
</dependency>

How to add dependency in a project

  1. Add dependency to a Maven project
  2. Add dependency to a Gradle project
  3. Add dependency to a SBT Scala project
  4. Add dependency to a Grape project

1. Add dependency to a Maven project

Maven: Add the org.mongodb:mongo-java-driver library to the dependencies element of your pom.xml file:

<dependencies>
<dependency>
  <groupId>org.mongodb</groupId>
  <artifactId>mongo-java-driver</artifactId>
  <version>3.12.10</version>
</dependency>
</dependencies>

To install org.mongodb:mongo-java-driver library use the following command:

mvn install

2. Add dependency to a Gradle project

Gradle Groovy DSL: Add the org.mongodb:mongo-java-driver library to the dependencies section of your build.gradle file:

dependencies {
implementation 'org.mongodb:mongo-java-driver:3.12.10'
}

Gradle Kotlin DSL: Add the org.mongodb:mongo-java-driver library to the dependencies section of your build.gradle.kts file:

dependencies {
implementation("org.mongodb:mongo-java-driver:3.12.10")
}

3. Add dependency to a SBT Scala project

Scala: Add the org.mongodb:mongo-java-driver library to your build.sbt file:

libraryDependencies += "org.mongodb" % "mongo-java-driver" % "3.12.10"

4. Add dependency to a Grape project

Grape: Add an annotation org.mongodb:mongo-java-driver library to your groovy script file:

@Grapes(
    @Grab('org.mongodb:mongo-java-driver:3.12.10')
)

Compile Dependencies (8)

Provided Dependencies (0)

Group / Artifact Usage

Test Dependencies (0)

Group / Artifact Usage