【发布时间】:2021-07-25 09:12:25
【问题描述】:
我能够使用 -includeresource 成功构建包含依赖 jar 的 bnd gradle 插件的捆绑包。但是,当我尝试构建要以编程方式包含的 jar 目录并尝试将整个目录包含到包中时,如下所示:
jar {
dependsOn copyJars
// Build OSGI bundle, including the incompatible version of the transitive dependency
bnd('-exportcontents': 'com.example.foo',
'-sources': 'false',
'-includeresource': 'build/tmp/include/=lib/; lib:=true')
}
copyJars 任务有效(我可以看到 jar 文件已被复制),但随后出现此错误:
error : Input file does not exist: lib/
error : Input file does not exist: lib/
这没有意义 - lib/ 不是输入,而是输出。
【问题讨论】: