Eclipse PDE:应该“对存储库进行分类”对可部署功能的导出执行什么操作?
我有一个category.xml 文件。我正在将功能导出为可部署功能。我已选中“分类存储库”框并为其指定了category.xml 文件的路径。然后我导出到一个目录。
据我所知,这对结果没有影响。我在目录中没有看到任何使用category.xml 信息的内容。将 Eclipse 指向该目录可以让我安装作为该功能一部分的插件,但我看到“没有分类项目”,除非我取消选中“按类别分组项目”。
我缺少什么?我还需要做什么才能使类别信息最终出现在导出的目录中?
[更新:Zoltán Ujhelyi 的解决方案]
我没有在该类别中输入足够的信息。我的新category.xml 文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/com.restphone.androidproguardscala.feature_0.0.8.jar" id="com.restphone.androidproguardscala.feature" version="0.0.8">
<category name="com.restphone.androidproguardscala.feature"/>
</feature>
<category-def name="com.restphone.androidproguardscala.feature" label="Android Proguard Scala cache system"/>
</site>
最终将这一行放入 content.xml 中:
<property name='org.eclipse.equinox.p2.name' value='Android Proguard Scala cache system'/>
请注意,导出后,category.xml 位于category.jar 中,因此 grep 不会找到该文本(它被压缩在category 中) 。罐)。
另请注意,有一个影响类别的突出 Eclipse 错误:
I have a category.xml file. I'm exporting a feature as a deployable feature. I've checked the 'categorize repository' box and given it a path to the category.xml file. Then I export to a directory.
As far as I can tell, this has no effect on the result. I don't see anything in the directory that uses information from category.xml. Pointing Eclipse to that directory lets me install the plugin that's part of the feature, but I see 'there are no categorized items' unless I uncheck "group items by category."
What am I missing? What else do I need to do to enable category information to end up in the exported directory?
[Update: solution from Zoltán Ujhelyi]
I hadn't put in enough information in the category. My new category.xml file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/com.restphone.androidproguardscala.feature_0.0.8.jar" id="com.restphone.androidproguardscala.feature" version="0.0.8">
<category name="com.restphone.androidproguardscala.feature"/>
</feature>
<category-def name="com.restphone.androidproguardscala.feature" label="Android Proguard Scala cache system"/>
</site>
That ends up putting this line in content.xml:
<property name='org.eclipse.equinox.p2.name' value='Android Proguard Scala cache system'/>
Note that after you export, category.xml is in category.jar, so grep isn't going to find the text (it's compressed in category.jar).
Also notice that there's an outstanding Eclipse bug that affects categories:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会检查category.xml 中的精确功能版本。如果特征版本号和类别版本号存在差异,则p2在更新时找不到类别信息。
如果版本没问题,我会尝试将该功能导出到新位置,并尝试从该位置安装(有时更新现有的 p2 存储库并非没有错误)。
I would check the precise feature versions in the category.xml. If there is a difference between the feature version number and the category version number, p2 does not find the category information during update.
If versions are fine, I would try to export the feature into a new location, and try to install from that location (sometimes updating an existing p2 repository is not bug-free).