获取 pom.xml 的 GridDB 依赖

huangapple go评论114阅读模式
英文:

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 依赖项的方法。以下是列出的步骤:

  1. 转到 https://github.com/griddb/griddb 并克隆存储库到您的本地计算机。打开终端并导航到文件夹,运行以下命令:
cd java_client
./make_source_for_mvn.sh
mvn clean
mvn install
  1. 在 Maven 完成编译之后,它将在 java_client/target 路径下创建一个 gridstore JAR 文件,名称类似于:gridstore-x.x.x

  2. 然后转到终端并导航到您想要安装此依赖项的存储库,运行以下命令:

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. 这应该会将依赖项安装到您的存储库中。然后,在您的 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:

  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:
&lt;dependency&gt; 
    &lt;groupId&gt;com.toshiba.mwcloud&lt;/groupId&gt;
    &lt;artifactId&gt;gs&lt;/artifactId&gt;
    &lt;version&gt;4.0&lt;/version&gt;
&lt;/dependency&gt;

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

huangapple
  • 本文由 发表于 2023年6月1日 09:33:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76378160.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定