1

The latest mongo db driver version is not available in maven rep. Is it usual or expected.

Mongo DB driver Release notes: https://github.com/mongodb/mongo-java-driver/releases Maven repo URL: https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver

mperle
  • 3,342
  • 8
  • 20
  • 34

1 Answers1

3

You can refer here.

For Legacy Driver:

<dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongodb-driver-legacy</artifactId>
    <version>4.1.0</version>
</dependency>

For Sync Driver:

<dependency>
    <groupId>org.mongodb</groupId>
    <artifactId>mongodb-driver-sync</artifactId>
    <version>4.1.0</version>
</dependency>
RLD
  • 1,867
  • 3
  • 15
  • 20
  • So, mongo-java-driver and mongodb-driver-legacy are same ? – mperle Aug 20 '20 at 16:44
  • 1
    No. You will get legacy classes e.g., com.mongodb.DBCollection, and com.mongodb.DBCursor in Legacy driver unlike Sync driver. More you can find in the link provided. – RLD Aug 20 '20 at 16:56
  • I see the latest supported version is 3.12.9 at https://repo.maven.apache.org/maven2/org/mongodb/mongodb-driver/. Didn't you have an error with during compiling? – Cloud Cho Feb 11 '22 at 17:10
  • Thanks that helped to resolve a problem that I was on weeks – Bug Mar 07 '22 at 05:20