包括一个非Mavenized依赖项,以便它与maven-shade-plugin一起使用 [英] Including a non-Mavenized dependency so it works with maven-shade-plugin

查看:330
本文介绍了包括一个非Mavenized依赖项,以便它与maven-shade-plugin一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想包含 GData客户端,不使用Maven,作为我的Maven项目的依赖。它作为一堆JAR文件发送。

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.

另外,我使用 Maven Shade Plugin 构建可执行的JAR,而无需任何外部依赖关系(默认配置,不重命名/包含/排除/转换依赖关系)。

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).

如何做到这一点?

(只需添加JAR作为资源不起作用,因为Shade插件必须解压缩)。

(Just adding the JARs as resources wouldn't work, since the Shade plugin must extract them).

推荐答案

你想检查maven文档在安装第三方jar

you want to check the maven docs on installing 3rd party jars

一旦安装到您的本地maven存储库阴影应该能像任何其他的依赖使用它们。

Once installed into your local maven repository, shade should be able to use them like any other dependency.

这篇关于包括一个非Mavenized依赖项,以便它与maven-shade-plugin一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆