<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: p2 and fragments</title>
	<atom:link href="http://urbas.tk/index.php/2009/05/18/p2-and-fragments/feed/" rel="self" type="application/rss+xml" />
	<link>http://urbas.tk/index.php/2009/05/18/p2-and-fragments/</link>
	<description>Radoslaw H. Urbas homepage / blog</description>
	<lastBuildDate>Fri, 18 Jun 2010 20:10:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Radoslaw Urbas</title>
		<link>http://urbas.tk/index.php/2009/05/18/p2-and-fragments/comment-page-1/#comment-4343</link>
		<dc:creator>Radoslaw Urbas</dc:creator>
		<pubDate>Tue, 19 May 2009 14:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://urbas.tk/?p=110#comment-4343</guid>
		<description>Pascal - thanks for the information! Option #1 seems to meet my requirements.
Now I&#039;m trying to figure out how to integrate usage of org.eclipse.equinox.p2.publisher with PDE headless build.</description>
		<content:encoded><![CDATA[<p>Pascal &#8211; thanks for the information! Option #1 seems to meet my requirements.<br />
Now I&#8217;m trying to figure out how to integrate usage of org.eclipse.equinox.p2.publisher with PDE headless build.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pascal Rapicault</title>
		<link>http://urbas.tk/index.php/2009/05/18/p2-and-fragments/comment-page-1/#comment-4319</link>
		<dc:creator>Pascal Rapicault</dc:creator>
		<pubDate>Tue, 19 May 2009 00:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://urbas.tk/?p=110#comment-4319</guid>
		<description>There is no silver bullet here. p2 just can&#039;t guess whether a fragment must be installed for a given plug-in. Early on we had tried various heuristics but this is not something that never worked. The only correct solution lies in having the IU for your plug-in express something about the mandatory fragments. For this there are two possibilities: 
1) The IU for the plug-in requires the IU of the fragments directly (using appropriate filters)
2) The IU for the plug-in requires a capability that will be provided by each fragment.
The main difference between 1) and 2) lies in whether or not a new fragment can be contributed without changing the IU for the plug-in. 
Now, how to do this? In both case you will have to play with the p2.inf and make sure you use the publisher application (which replaces the metadata generator). 
To implement case #1, the plug-in will have to have a p2.inf that will declare the dependencies on the fragments
For example:
  requires.1.namespace=org.eclipse.equinox.p2.iu
  requires.1.name=fragment.for.windows
  requires.1.filter=(os=win32)
  requires.1.greedy=true
  requires.1.range=[1.0.0, 2.0.0)

For additional fragments, simply change the middle digit.

To implement case #2, the fragments will each have to have a p2.inf indicating the capability they provide
  provides.1.namespace=my.plugin
  provides.1.name=implementation.provider
  provides.1.version=1.0.0 

And the p2.inf for the plug-in will only have to have one requirement like the following one.
  requires.1.namespace=my.plugin
  requires.1.name=implementation.provider
  requires.1.filter=(os=win32)
  requires.1.greedy=true
  requires.1.range=[1.0.0, 2.0.0)</description>
		<content:encoded><![CDATA[<p>There is no silver bullet here. p2 just can&#8217;t guess whether a fragment must be installed for a given plug-in. Early on we had tried various heuristics but this is not something that never worked. The only correct solution lies in having the IU for your plug-in express something about the mandatory fragments. For this there are two possibilities:<br />
1) The IU for the plug-in requires the IU of the fragments directly (using appropriate filters)<br />
2) The IU for the plug-in requires a capability that will be provided by each fragment.<br />
The main difference between 1) and 2) lies in whether or not a new fragment can be contributed without changing the IU for the plug-in.<br />
Now, how to do this? In both case you will have to play with the p2.inf and make sure you use the publisher application (which replaces the metadata generator).<br />
To implement case #1, the plug-in will have to have a p2.inf that will declare the dependencies on the fragments<br />
For example:<br />
  requires.1.namespace=org.eclipse.equinox.p2.iu<br />
  requires.1.name=fragment.for.windows<br />
  requires.1.filter=(os=win32)<br />
  requires.1.greedy=true<br />
  requires.1.range=[1.0.0, 2.0.0)</p>
<p>For additional fragments, simply change the middle digit.</p>
<p>To implement case #2, the fragments will each have to have a p2.inf indicating the capability they provide<br />
  provides.1.namespace=my.plugin<br />
  provides.1.name=implementation.provider<br />
  provides.1.version=1.0.0 </p>
<p>And the p2.inf for the plug-in will only have to have one requirement like the following one.<br />
  requires.1.namespace=my.plugin<br />
  requires.1.name=implementation.provider<br />
  requires.1.filter=(os=win32)<br />
  requires.1.greedy=true<br />
  requires.1.range=[1.0.0, 2.0.0)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
