Maven and Gradle JDBC Drivers for Various Databases

Maven:

1. MySQL:

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.23</version> <!-- Use the latest version -->
</dependency>

2. Oracle:

<dependency>
    <groupId>com.oracle.database.jdbc</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>19.11.0.0</version> <!-- Use the latest version -->
</dependency>

3. PostgreSQL:

<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>42.2.20</version> <!-- Use the latest version -->
</dependency>

4. Microsoft SQL Server:

5. SQLite:

6. DB2:

Gradle:

1. MySQL:

2. Oracle:

3. PostgreSQL:

4. Microsoft SQL Server:

5. SQLite:

6. DB2:

Note: Replace the version numbers in the dependencies with the latest versions available on Maven Central or the respective repositories for accurate and up-to-date libraries.

Last updated