我如何修复eclipse警告:“建议插件'XXX'从JAR运行,指定'unpack =”false“'属性”

时间:2021-07-27 22:51:09

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?

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

1 个解决方案

#1


Try setting Bundle-ClassPath in your manifest.

尝试在清单中设置Bundle-ClassPath。

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.

这个标题告诉OSGi你的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).

PDE / UI基于此警告是否认为您的捆绑包应该是一个罐子。决定的依据之一是Bundle-ClassPath是否包含“。”。 (在文件夹形状的包中,这将意味着根文件夹中的.class文件而不是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

例如,bundle org.eclipse.pde.build作为文件夹发布,所有类文件都在嵌套的jar中,它有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.

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

#1


Try setting Bundle-ClassPath in your manifest.

尝试在清单中设置Bundle-ClassPath。

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.

这个标题告诉OSGi你的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).

PDE / UI基于此警告是否认为您的捆绑包应该是一个罐子。决定的依据之一是Bundle-ClassPath是否包含“。”。 (在文件夹形状的包中,这将意味着根文件夹中的.class文件而不是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

例如,bundle org.eclipse.pde.build作为文件夹发布,所有类文件都在嵌套的jar中,它有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.

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