将jar发布到maven本地并在根项目中使用此依赖项

发布于 2025-01-18 12:53:13 字数 377 浏览 3 评论 0原文

更新

我想使用 Maven 存储库上不可用的外部库。

目前,我有一个名为 libs 的子项目,位于 CLIPSJNI.jar 中 在根项目的 Gradle.build 中,我像这样声明依赖项

dependencies {
  implementation files('/libs/library.jar')
}

,但为了运行 java 应用程序,我还必须添加带有 .jnilib 的文件。

我的问题是可以将此 jar 发布到本地 Maven 并重用此依赖项。所以 .jnilib 是多余的。

最初的问题已解决。如果您想在 java 应用程序中使用 CLIPSJNI,您只需遵循 2 个步骤,下面的注释中对此进行了描述。

Update

I would like to use external library that is not available on maven repository.

Currently, I have subproject called libs and within CLIPSJNI.jar
In Gradle.build of root project I declare dependency like this

dependencies {
  implementation files('/libs/library.jar')
}

but in order to run java application I also have to add file with .jnilib.

My question is it possible to publish to maven local this jar and reuse this dependency. So that .jnilib is redundant.

Initial question was resolve. If you wanna use CLIPSJNI in java application there are only 2 steps you should follow, which are described in comments down below.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文