如何修复 Eclipse 警告:“建议使用插件‘XXX’” 要从 JAR 运行,请指定“unpack=”false”” 属性”

发布于 2024-07-22 19:36:27 字数 57 浏览 1 评论 0原文

该插件确实需要解压,是的,我知道它不应该关心,但它确实关心。 我只是想让这个警告消失,我该怎么做?

The plug-in really needs to be unpacked, yes I know it shouldn't care, but it does. I just want to make this warning go away, how do I do that?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月静好 2024-07-29 19:36:27

尝试在清单中设置 Bundle-ClassPath

这个头告诉 OSGi 在你的包中哪里可以找到这些类。 如果未指定,默认值为“.”,这意味着您的包的根目录。

PDE/UI 将此警告基于它是否认为您的包应该是一个 jar。 它做出决定的依据之一是 Bundle-ClassPath 是否包含“.”。 (在文件夹形状的包中,这意味着根文件夹中的 .class 文件而不是 jar)。

例如,捆绑包 org.eclipse.pde.build 作为一个文件夹提供,所有类文件都在嵌套的 jar 中,并且它具有 Bundle-ClassPath: pdebuild.jar

如果您不包含任何类文件,并且没有嵌套的 jar,您可能只需在包中指定一些任意文件夹。

Try setting Bundle-ClassPath in your manifest.

This header tells OSGi where in your bundle to find the classes. If not specified, the default value is ".", which means the root of your bundle.

PDE/UI is basing this warning on whether or not it thinks your bundle should be a jar. One of the things it bases the decision on is whether or not the Bundle-ClassPath contains ".". (In a folder shaped bundle, this would mean .class files in the root folder instead of a jar).

For example, the bundle org.eclipse.pde.build ships as a folder, all the class files are in nested jars, and it has Bundle-ClassPath: pdebuild.jar

If you don't contain any class files, and have no nested jars, you could probably just specify some arbitrary folder in your bundle.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文