HBase Ganos API基于Ali-Hbase Client客户工具包与GeoTools工具包对数据库进行交互操作,因此需要在maven中配置pom.xml文件导入相关工具包,具体如下:

<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <geomesa.version>2.1.0</geomesa.version>
        <scala.abi.version>2.11</scala.abi.version>
         <gt.version>18.0</gt.version>
        <hbase.version>1.1.2</hbase.version>
        <zookeeper.version>3.4.9</zookeeper.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.locationtech.geomesa</groupId>
            <artifactId>geomesa-hbase-datastore_2.11</artifactId>
            <version>2.0.2</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun.hbase</groupId>
            <artifactId>alihbase-client</artifactId>
            <version>${hbase.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>com.google.guava</artifactId>
                    <groupId>guava</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.aliyun.hbase</groupId>
            <artifactId>alihbase-server</artifactId>
            <version>${hbase.version}</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun.hbase</groupId>
            <artifactId>alihbase-common</artifactId>
            <version>${hbase.version}</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun.hbase</groupId>
            <artifactId>alihbase-protocol</artifactId>
            <version>${hbase.version}</version>
        </dependency>
    </dependencies>

进入命令行工具,定位到maven工程根目录,运行下面命令编译项目:

mvn clean install

成功编译后会在target目录下生成编译好的class文件与jar包,证明环境搭建成功。