gpt4 book ai didi

maven-2 - OSGI:在maven-bundle-plugin中生成bundle-classpath

转载 作者:行者123 更新时间:2023-12-02 04:42:23 26 4
gpt4 key购买 nike

我正在尝试将 web-inf/lib 中的所有 jar 添加到 Bundle-ClassPath 中。我看到了几种方法,但没有一个有效:

1)添加

<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
<Embed-Directory>WEB-INF/lib</Embed-Directory>
<Embed-Transitive>true</Embed-Transitive>

2)添加

<Bundle-ClassPath>.,{maven-dependencies},WEB-INF/classes</Bundle-ClassPath>

当然,在“Bundle-ClassPath”中逐个编写 jar 可以解决问题,但这听起来不是一个合理的解决方案。

谢谢

最佳答案

在您的第一个代码片段中,不会使用 <Embed-Dependency>你有写作业吗? http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html 中的示例似乎表明会的。

另外,您使用的是哪个版本的 bnd 插件?这些功能自 1.2.0+ 起可用。

关于maven-2 - OSGI:在maven-bundle-plugin中生成bundle-classpath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4842749/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com