Type 4 JDBC driver that allows Java programs to connect to a MongoDB database.
This driver is embedded into DataGrip.
You can download the precompiled driver (jar) on the releases page.
# Linux, MacOs
./gradlew shadowJar
# Windows
gradlew.bat shadowJar
You will find driver (jar) in build/libs.
You can publish the driver to a local Maven repository in the .maven directory within the repository:
# Using Make (recommended)
make publish
# Or using Gradle directly
./gradlew clean shadowJar publishToMavenLocal -Dmaven.repo.local=.mavenThe artifact will be published to .maven/com/dbschema/mongo-jdbc-driver/1.20/.
To use the published artifact in another project, add the local repository to your build configuration:
Gradle:
repositories {
maven {
url = uri("path/to/mongo-jdbc-driver/.maven")
}
}
dependencies {
implementation 'com.dbschema:mongo-jdbc-driver:1.20'
}Maven:
<repositories>
<repository>
<id>local-maven</id>
<url>file://path/to/mongo-jdbc-driver/.maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.dbschema</groupId>
<artifactId>mongo-jdbc-driver</artifactId>
<version>1.20</version>
</dependency>
</dependencies>