What is 'the' way to add a bundle jar to a p2 based Eclipse target platform?

拥有回忆 提交于 2019-12-22 19:13:07

问题


I'm wondering: What is the best way of adding a bundle to a p2 based target platform? I don't want to use local directories, I want to have a target platform that works 'out of the box' for all our team members.

Right now I manage, but I have a feeling I'm missing a more straightforward way of doing this.

My situation is as follows:

My target platform has a bunch of p2 locations, hosted at our on-site server. Most are mirrored repositories, but I have one I use for 'miscellaneous' bundles.

This is how I add a bundle to the target platform.

  • I switch to another workspace, which does use a bundle directory with jars.
  • I add the bundle jar to that directory.
  • I add the bundle to my 'third party' feature
  • I export the feature, and upload it to our server, deleting the old one
  • I switch back to my normal workspace, and reload the target platform link.

Sometimes eclipse gets a bit confused and keeps using a cached version, but in general this approach works.

My question:

Is there a easier way? Is there a more 'incremental' way? I rebuild the p2 repository, instead of adding a feature with a new version.


回答1:


You should have a look at p2's publisher and mirror tools. The publisher creates p2 metadata, and with the mirroring, you can copy artifacts into an existing p2 repository (given you have file system access).

There is also a Maven front-end to these tools provided by the Tycho project.



来源:https://stackoverflow.com/questions/10191659/what-is-the-way-to-add-a-bundle-jar-to-a-p2-based-eclipse-target-platform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!