1

I am trying to use GridDB with my Java application, and I am following this tutorial (https://medium.com/griddb/migrating-from-mysql-to-griddb-8e1ad82e1cee) to play around with it.

So before starting, I am required to get the GridDB dependency into my Java application but it doesn't work, while Maven repository doesn't have the dependency either. The GridDB official website is lacking some steps on how to install the dependency, does anyone knows how?

Chuah Cheng Jun
  • 243
  • 1
  • 3
  • 17

1 Answers1

2

After some digging and researching, I found the way to get the gridstore.jar dependency. Here are the steps listed below:

  1. Go to https://github.com/griddb/griddb and clone the repository down into your local machine. Open your terminal and navigate to the folder, run the following command:
cd java_client
./make_source_for_mvn.sh
mvn clean
mvn install
  1. After the Maven has done the compilation, it could create a gridstore JAR file located under the java_client/target path, the name would be something like this: gridstore-x.x.x

  2. Then go to the terminal and navigate to your own repository that you want to install this dependency, run the following command:

mvn install:install-file -Dfile=/path_to_the_griddb_folder/java_client/target/gridstore-x.x.x.jar
-DgroupId=com.toshiba.mwcloud -DartifactId=gs -Dversion=4.0 -Dpackaging=jar
  1. It should install the dependency into your repository. Then inside your pom.xml file, add the following dependency:
<dependency> 
    <groupId>com.toshiba.mwcloud</groupId>
    <artifactId>gs</artifactId>
    <version>4.0</version>
</dependency>

And then you should be able to import the libraries now.

Chuah Cheng Jun
  • 243
  • 1
  • 3
  • 17