英文:
Getting GridDB dependency for pom.xml
问题
我正在尝试在我的Java应用程序中使用GridDB,并且正在按照此教程(https://medium.com/griddb/migrating-from-mysql-to-griddb-8e1ad82e1cee)进行操作。
因此,在开始之前,我需要将GridDB依赖项引入我的Java应用程序,但无法正常工作,而Maven仓库也没有这个依赖项。GridDB官方网站缺少关于如何安装依赖项的一些步骤,有人知道吗?
英文:
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?
答案1
得分: 2
以下是已翻译的内容:
经过一些挖掘和研究,我找到了获取 gridstore.jar 依赖项的方法。以下是列出的步骤:
- 转到 https://github.com/griddb/griddb 并克隆存储库到您的本地计算机。打开终端并导航到文件夹,运行以下命令:
cd java_client
./make_source_for_mvn.sh
mvn clean
mvn install
-
在 Maven 完成编译之后,它将在 java_client/target 路径下创建一个 gridstore JAR 文件,名称类似于:gridstore-x.x.x
-
然后转到终端并导航到您想要安装此依赖项的存储库,运行以下命令:
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
- 这应该会将依赖项安装到您的存储库中。然后,在您的 pom.xml 文件中添加以下依赖项:
<dependency>
<groupId>com.toshiba.mwcloud</groupId>
<artifactId>gs</artifactId>
<version>4.0</version>
</dependency>
然后,您现在应该能够导入这些库了。
英文:
After some digging and researching, I found the way to get the gridstore.jar dependency. Here are the steps listed below:
- 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
-
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
-
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
- 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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论