Sorry Ivan, I missed your reply.
On 8-Aug-2011, at 4:29 AM, Ivan St. Ivanov wrote:
> 2) Created update.p2.inf file in project's root directory (I'm using tycho)
> with this content:
>
> requires.1.namespace = org.eclipse.equinox.p2.iu
> requires.1.name = update.feature.feature.group
> requires.1.range = (1.0.0, 2.0.0)
That looks right. You should see that the content.xml for your generated
repository (for Tycho, found in target/repository/content.{xml,jar}) should
include your product entry and have your update.feature.feature.group listed as
a requirement. For example, for Kizby, where I include a feature
'ca.mt.eclipse.base' through a p2.inf, I see:
<unit id='ca.mt.kizby.product' version='1.0.0'>
[...]
<requires size='15'>
[...]
<required namespace='org.eclipse.equinox.p2.iu'
name='ca.mt.eclipse.base
.feature.group' range='[3.7.0,4.0.0)'/>
> After I ran the build my repository just contained content.xml, artifacts.xml
> and one file in the binaries directory. It is missing the feature jar and the
> three plugin jars.
There's a difference between publishing a product (putting the metadata into
the repository) and materializing the product (making a deployable copy). To
materialize products in Tycho, the currently recommended approach is to use the
'eclipse-repository' packaging type and specify the publisher and then the
director to materialize the products. I'm not sure why it is, but the Tycho
director doesn't seem to include the features defined in the p2.inf when
materializing products. For that, you need to create a category.xml to have
the features be included in your repository. The simplest way is something
like the following:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="org.eclipse.equinox.executable" />
<feature id="update.feature" />
</site>
I'm not 100% certain the org.eclipse.equinox.executable is required, but I've
had it in there for ages.
If that doesn't work, then verify that:
1. your pom.xml packaging is 'eclipse-repository'
2. that you're including the tycho-p2-publisher-plugin with
publishArtifacts=true
3. your update.feature is either published to your local maven repository or
you're running it from your top-level so that it is included in your reactor
You might also find it useful to look at the Minerva project
(http://wiki.eclipse.org/Minerva) for suggestions on building with Tycho.
Brian.
_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev