H2 Maven Dependency

H2 is an open-source lightweight Java database. It can be embedded in Java applications or run in the client-server mode. 
Mainly, the H2 database can be configured to run as an in-memory database, which means that data will not persist on the disk. Because of an embedded database, it is not used for production development but mostly used for development and testing.

H2 Database Engine Maven Dependency

Copy below H2 Database Engine maven dependency and paste in your project pom.xml file:
<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <version>1.4.200</version>
    <scope>test</scope>
</dependency>
For more details about the proper version to use, check out the following Maven Central link.

H2 Database Engine Gradle Dependency

Copy below H2 Database Engine Gradle dependency and paste in your project build.gradle file:
// https://mvnrepository.com/artifact/com.h2database/h2
testCompile group: 'com.h2database', name: 'h2', version: '1.4.200'

Comments