简体   繁体   English

Eclipse - 构建一个功能项目

[英]Eclipse - building a feature project

So I'm deploying eclipse projects. 所以我正在部署eclipse项目。 I have a set of plugins that live in a 'feature project' and that feature project lives in an 'Update site' project. 我有一组插件存在于“功能项目”中,该功能项目位于“更新站点”项目中。

All goes well on first build. 在第一次构建时一切顺利。 Sweet as a nut. 甜如坚果。

When I make some changes to the feature project and then want to rebuild in the update site project I go to click my 'build all' button.... 当我对功能项目进行一些更改,然后想要在更新站点项目中重建时,我会点击我的“build all”按钮.... 构建按钮

...but I get the following error... ...但我收到以下错误...

在此输入图像描述

I presume this is a versioning issue - my only way around this appears to be that I remove the feature project entirely from the update site project, and then re-add the version of it that does not have the explicit versioning number 我认为这是一个版本控制问题 - 我唯一的解决方法似乎是我完全从更新站点项目中删除了功能项目,然后重新添加没有显式版本号的版本 在此输入图像描述

...but this feels awkward, is there some more effective method I should be using? ...但这感觉很尴尬,我应该使用哪种更有效的方法?

(EDIT - I've been asked for what happens when I click 'more details' here's the photo) (编辑 - 当我点击'更多详细信息'这里的照片时,我被问到会发生什么)

在此输入图像描述

I wish I could give references for this, but I find the documentation on how update site projects work to be woefully lacking. 我希望我可以为此提供参考,但我发现有关更新站点项目如何工作的文档非常缺乏。 Hopefully this explanation helps. 希望这个解释有所帮助。

What should happen here is that on the first build, your reference to your feature gets turned from being referred to as featureProject (1.0.0.qualifier) to featureProject (1.0.0.201204171009) . 这里应该发生的是,在第一次构建时,您对要素的引用从被称为featureProject (1.0.0.qualifier)变为featureProject (1.0.0.201204171009) You can see this change in the site.xml, and corresponding jar files should be built in the updateSite\\features and updateSite\\plugins directories, with the feature jar being referred to by the updated site.xml. 您可以在site.xml中看到此更改,并且应在updateSite \\ features和updateSite \\ plugins目录中构建相应的jar文件,更新的site.xml将引用功能jar。

The second time you build, it is supposed to build a new feature and plugin jar, replacing the qualifier with the current timestamp. 第二次构建时,应该构建一个新功能和插件jar,用当前时间戳替换限定符。

In your case though, something bad is happening in between. 在你的情况下,两者之间发生了一些不好的事情。 One symptom is obviously that error, but another is the 'select feature' dialog box you snapshotted. 一个症状显然是错误,但另一个是您拍摄的“选择功能”对话框。 Notice that the link for the featureProject (1.0.0.201204172009) looks the same as all the installed features in your eclipse instance, as opposed to the feature that you have the source for: featureProject (1.0.0.201204172009) 请注意, featureProject (1.0.0.201204172009)的链接看起来与eclipse实例中的所有已安装功能相同,而不是您拥有源的功能: featureProject (1.0.0.201204172009)

Did you perhaps, in an intermediate step, use the update site you built to install your plug-in in to this eclipse instance? 您是否可以在中间步骤中使用您构建的更新站点将插件安装到此eclipse实例中? If so, I suspect that would confuse the build process, especially if you also removed the feature jar from the updateSite\\features directory. 如果是这样,我怀疑这会混淆构建过程,特别是如果您还从updateSite \\ features目录中删除了功能jar。

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

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