The example given here are I think becoming increasingly relevant to a number of use cases that involve server-side equinox and p2.
Unfortunately, the example supplied is built against a pre-release version of equinox 3.4 and cannot be meaningfully re-used today.
I would be happy to refactor this code to use equinox 3.4 and submit it back to the community but I'm no p2 expert and may need a little help with this effort from time to time. We would also need to establish suitable requirements and a suitable design to satisfy those requirements so (a) I don't go and build something completely irrelevant and (b) whatever is built is sympathetic to p2 and its vision moving forwards so it doesn't become irrelevant at the very next release.
Scott Lewis Hi Warren. I've also been working with the servlet bridge and p2...with the goal of producing a configuration that allows server-side installation and update via p2. I've had some success, and I'll describe this briefly here. I'm quite willing to contribute things back to the community as well, if desired.
First, there were some changes made to the servlet bridge itself (i.e. bug 245020) to make it easier to create equinox configurations.
Then, I created a feature and product specification that included: 1) equinox; 2) p2 and support (e.g. ECF file transfer, configurator, etc). Actually, I created several configurations witifferent parts of p2 (i.e. just core, core plus repos, core, repos, console, etc).
Further, I can use the PDE product export to create repos, and then run the director on the resulting repository in order to create a webapp that holds the servletbridge, the bundles, as well as generates the appropriate info from a config.ini file for the simpleconfigurator, and creates/generates an initial p2 profile for the configuration. Then I can take this output create a war from it and then deploy to an application server. As a result of deployment the osgi console will be started and the p2 console commands made available (along with other console commands of course).
So the major steps here are:
1) Run PDE product export (with the product config of choice) to create repository 2) Run director application to create bundles.info (configurator) and an initial p2 profilee 3) Create war and deploy to j2ee server
In the desire to make this simpler, I've added an enhancement request to PDE build bug 248795.
Once I have such a configuration and deploy it as war to tomcat/jetty I can successfully install things via p2 into the new environment.
I think this may match your desired requirements...but rather than generating a repo at deploy time, it creates a repo (via director app) during build.
I think this also could make a much better (and easier webapp quickstart page...i.e. with a more compelling p2 installed app like knopflerfish httpconsole and/or something else.
1. A bundle that, when activited, can bootstrap an instance of equinox with a dynamically created p2 profile, bundles.info, etc by introspecting the installations features & plugins folders 2. For continuous build use cases perhaps we would instead require an ant task that can create the p2 profile
1. For most of the code I can find equivalents in the released codeline. However, one class in particular is troubling me; PersistenceMetadata doesnt appear to have an equivalent.