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:
<repository>
      <id>mapr-releases</id>
      <url>http://repository.mapr.com/maven/</url>
      <snapshots><enabled>true</enabled></snapshots>
      <releases><enabled>true</enabled></releases>
</repository>
For client applications, edit the pom.xml file and add the following entry in the dependencies tag.
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
For server and map-reduce applications, add the following entry in the dependencies tag in the pom.xml file.
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>

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, if you are using HBase 0.98.12, you can add the following in the dependencies tag.
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>0.98.12-mapr-1506-m7-5.1.0</version>
If you are using HBase 1.1, you can add the following in the dependencies tag.
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.1.1-mapr-1602-m7-5.1.0</version>