The recommended way to get started using one of the drivers in your project is with a dependency management system.
There are two Maven artifacts available in the 3.4 release. The preferred artifact for new applications is mongodb-driver
however, we still publish the legacy mongo-java-driver
uber-jar.
The MongoDB Driver mongodb-driver
is the updated synchronous Java driver that includes the legacy API as well as a new generic MongoCollection
interface that complies with a new cross-driver CRUD specification.
mongodb-driver
is not an OSGi bundle: both mongodb-driver
and mongodb-driver-core
, a dependency of mongodb-driver
, include classes from the com.mongodb
package.
For OSGi-based applications, use the mongo-java-driver uber jar instead.
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.4.3</version>
</dependency>
</dependencies>
dependencies {
compile 'org.mongodb:mongodb-driver:3.4.3'
}
Note: You can also download the mongodb-driver
jar directly from sonatype.
If downloading mongodb-driver
manually, you must also download its dependencies: bson
and mongodb-driver-core
For new applications, the preferred artifact is mongodb-driver; however, the legacy mongo-java-driver
uber jar is still available. The uber jar contains: the BSON library, the core library, and the mongodb-driver
.
The mongo-java-driver
artifact is a valid OSGi bundle.
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.4.3</version>
</dependency>
</dependencies>
dependencies {
compile 'org.mongodb:mongo-java-driver:3.4.3'
}
Note: You can also download the mongo-java-driver
jar directly from sonatype.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4