包含非 Mavenized 依赖项,以便与 maven-shade-plugin 一起使用
我想包含 GData Client,它不使用 Maven,因为我的 Maven 项目的依赖项。 它以一堆 JAR 文件的形式提供。
另外,我使用 Maven Shade Plugin 构建一个可执行 JAR,无需任何外部依赖项(使用默认配置,不重命名/包含/排除/转换依赖项)。
我怎样才能做到这一点?
(仅将 JAR 添加为资源是行不通的,因为 Shade 插件必须提取它们)。
I want to include GData Client, which doesn't use Maven, as a dependency into my Maven project. It ships as a bunch of JAR files.
Additionaly, I use Maven Shade Plugin to build an executable JAR without any external dependencies (with the default configuration, no renaming/including/excluding/transforming of dependencies).
How can I do that?
(Just adding the JARs as resources wouldn't work, since the Shade plugin must extract them).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你想检查关于 安装第 3 方 jars< 的 Maven 文档/a>
一旦安装到本地 Maven 存储库中,Shadow 就应该能够像任何其他依赖项一样使用它们。
you want to check the maven docs on installing 3rd party jars
Once installed into your local maven repository, shade should be able to use them like any other dependency.
如果您出于某种原因不想在存储库中安装 JAR,请参阅此答案: 在 Maven 中添加依赖
See this answer if you don't want to install the JARs in your repository for whatever reason: Add a dependency in Maven