Showing posts with label equinox. Show all posts
Showing posts with label equinox. Show all posts

Monday, September 12, 2011

More on p2 and OBR

When I set out to write my previous blog post about why not OBR, the intent was to give, with a catchy title, an historical perspective on p2 (thus the recent title update) but also to answer people who have been asking for years this question

(and yesterday night another one of those came in).


The point was not to do a comparison of p2 and OBR as they are today, and especially not to claim that OBR is not good today. Both technologies have pros and cons. My statements about OBR were a reflection of the situation as it was ~5 years ago. To be honest, I have not been following the recent development on the spec, just heard some rumours.


When I wrote the previous post, I also wrote two additional paragraphs that I had not published. One was about our absence of involvement in the spec process and one about going forward. So here they are:


Could we have collaborated on the spec and implementation?

Maybe, but at the time the interest around OBR was rather low at the OSGi alliance, we did not had the bandwidth to drive improvements to the specification since we were focusing on shipping running software (the first release may not have been the best thing, I agree), and my management at the time was not up for the work, distraction, and frustration it could have represented. It needs to be remembered that some of us had been involved in the OSGi spec process to drive changes (adding fragments, bsn, require bundle, etc. Yes all these mostly were driven by the equinox team) and it had been a painful experience that left the people involved with scars, and made some of them the ongoing target of criticisms because of the changes they pushed for.


A couple years later (~2009?), OBR got brought back the forefront in the context of the OSGi Enterprise Expert Group. At this point, I have been involved in the spec work even to a point where I was the lead. Because of my lack of time, and the problems scoping the work, my contributions have been limited and then I stopped being involved as Sonatype withdrew from the OSGi alliance.



Is there a way forward?

Until a publicly visible draft of OBR is available, I can't provide a definitive answer. However implementing OBR on top of p2 has definitely been discussed several times and is not out of question especially if the specification stays focused on providing a resolver API and a repository API.


Now time, energy and contribution will tell...


PS: there are things that need to be corrected from Neil's post, but my other commitments are calling so it will have to wait.


Monday, March 14, 2011

p2 at EclipseCon 2011

This year again, there will be plenty of opportunity to learn and discuss p2 at EclipseCon.


There are four talks:

* p2, your savior or your achilles heel? Everything an Eclipse team needs to know about p2

* Discovering the p2 API's

* Updates in the micro space

* Raising the Eclipse Provisioning to the Clouds


One BOF:

* Fireside chat on p2


And a lot of p2 committers and enthusiasts ready to discuss anything :)


See you there!

Wednesday, May 12, 2010

Friday, November 27, 2009

Nesting categories

A recurring topic around categorization in p2 is the ability to nest categories.


Like for the categorization of bundles, the trick consists in using the eclipse feature editor to express the dependencies and thus construct the desired nesting.

Steps:
First phase, creation of the inner category.
  1. Create a feature project called InnerCategory1. In our example this will be the feature containing the elements to be shown categorized.
  2. Turn this feature into a category by creating a p2.inf and filling it with:
    properties.1.name=org.eclipse.equinox.p2.type.category
    properties.1.value=true
  3. Remove everything from the build.properties of the feature.
  4. Use the features and plug-ins tab of the feature editor to add content to be categorized.
This concludes the creation of the inner category. The following steps create the "top level" category.
  1. Create a feature project called TopLevelCategory
  2. Turn this feature into a category creating a p2.inf and filling it with:
    properties.1.name=org.eclipse.equinox.p2.type.category
    properties.1.value=true
  3. Remove everything from the build.properties of the feature.
  4. In the features tab of the editor, add InnerCategory1
  5. Export the top level feature enabling metadata generation
You can find the code of this example on the wiki.
Happy categorization, happy provisioning!

Categorizing plug-ins

Despite what is commonly believed and what I have repeated to several occasions, p2 does allow for the installation of anything, anything being for example just bundles. It just happens that today, with the practices adopted over the years, features have grown to be the primary way of delivering features.
I'm now showing how to create a p2 repository whose category refers to bundles.
Steps:
  1. Create a new feature project. This adds the category property to the installable unit, thus allowing the UI to recognize the feature as a category to be displayed.
  2. Create a file named p2.inf in the feature project and paste in the following two lines:
    properties.1.name=org.eclipse.equinox.p2.type.category
    properties.1.value=true

  3. Include the plug-ins you want to see being categorized. This is where you define what goes in the category. Each entry in the plug-ins list will be shown under the category.

  4. Remove everything from the build.properties included in the feature. This causes PDE to not generate a feature.jar.
  5. Export the feature enabling metadata generation.

You can find a zip of this example on the wiki.
Happy categorization, happy provisioning!

Thursday, August 27, 2009

p2 community contribution

If you are interested in contributing to p2 during the Helios (3.6.) cycle, please add your areas of interest on the wiki. It can either be new functionalities as well as things that you would like to see improved.

Expressing your desire early will allow for other contributors to potentially join you and for the current set of p2 committers to plan for coming contributions.

Thanks in advance.


Monday, August 03, 2009

p2 EclipseCon 09 slides posted

I have just posted the slides for the talk and tutorial I gave on p2 at EclispeCon 2009.
The talk goes over the p2 functionalities from a runtime perspective and the build / dev time aspects.
The tutorial covers all the major aspects of p2. It ranges from the simple usage of product delivery to an in-depth presentation of the p2 concepts.
Enjoy!