简体   繁体   English

Eclipse / OSGi:如何控制通过导出的插件(jar)创建的文件名

[英]Eclipse/OSGi: How to control the file-name created via an exported plugin (jar)

Trying to control the name of the file created via Export when exported an OSGi plugin from Eclipse. 从Eclipse导出OSGi插件时,尝试控制通过“导出”创建的文件的名称。 This is specifically by selecting the plug-in the Project Explorer, then selecting the menus: 'Export | 具体来说,这是通过选择插件Project Explorer,然后选择菜单:“导出| Deployable plugins and fragments'. 可部署的插件和片段”。 The options seem limited or almost non existent. 选项似乎有限或几乎不存在。 For example, if I have plugin called MyPlugin, and I export it, I can dictate the output folder but I can't change the name (it is always 'MyPlugin'...), and it always appends a date code, such as 201506041521. That tag (the Qualifier Replacement) always shows up, even if I unselect the check-mark for it in the Options panel of the Export Dialog. 例如,如果我有一个名为MyPlugin的插件,并且将其导出,则可以指定输出文件夹,但不能更改名称(它始终是'MyPlugin'...),并且它总是附加日期代码,例如就像201506041521一样,即使我在“导出”对话框的“选项”面板中取消选中该标记,该标记(“限定符替换”)也始终显示。

Essentially, I'm trying to be able to replace an exact bundle-jar, so that I can then call update to update the installed bundle contents. 本质上,我试图替换一个确切的bundle-jar,以便随后可以调用update来更新已安装的bundle内容。 As it is, I have to save the bundle, then go in an rename it to the old version, which is a pain. 照原样,我必须保存捆绑软件,然后将其重命名为旧版本,这很麻烦。

Is there anyway to change this to exactly specify the name or at least get rid of the Qualifier Replacement tag? 无论如何,有没有要更改此名称以准确指定名称或至少摆脱Qualifier Replacement标签的方法?

Qualifier is in the MANIFEST.MF file in the Version Tag. 限定符在版本标记的MANIFEST.MF文件中。 Remove it there. 将其删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM