Using Maven to Manage Dependencies

If you want to use MapR-DB with your Maven application, follow these instructions to set up the POM file to manage your Maven dependencies.

Edit the pom.xml File

Add MapR's maven repository to the list of repositories in your application's pom.xml. For example:
For client applications, edit the pom.xml file and add the following entry in the dependencies tag.
For server and map-reduce applications, add the following entry in the dependencies tag in the pom.xml file.

Add the Version Tags

MapR-DB supports both HBase 0.98 and HBase 1.1 APIs. For the version tags, specify the version used by your application. The JAR file versions are listed in the following locations.

Copy and paste the version you need into the <version> tags in the POM file for your HBase client application or HBase server application.

Note: When defining the version for your application, specifying the version without m7-<maprversion> will limit access to HBase tables only. Ensure that the version tags include reference to m7-<maprversion> if you want your applications to access MapR-DB also.
For example, you can add the following in the dependencies tag.