Home » Eclipse Projects » Eclipse Platform » Feature-based product and specifying what plug-ins to include
Feature-based product and specifying what plug-ins to include [message #333759] |
Fri, 02 January 2009 19:15 |
Eclipse User |
|
|
|
Originally posted by: bsv.datatel.com
Let's say have a couple features like this.
Company Feature A
- Company Plugin A
- Depends on GEF Feature
Company Feature B
- Company Plugin B
- Depends on BIRT Feature
Now I want to build an Eclipse product with these features. So I create
a single "product feature", and include the two features above.
Then I create a ".product" file, and include the single product feature.
Is this sufficient for the PDE/Build to know what plugins need to be
packaged when the product build runs? 'Cause right now, we're manually
specifying a bunch of stuff on the "Plug-ins and Fragments" tab of the
product feature. This seems like a duplication of what is already
specified in plugin.xml and feature.xml for the above items.
I guess the question is, does the product build work its way down the
hierarchy, like...
Product depends on Company Feature A.
Company Feature A depends on Company Plugin A
Company Feature A depends on Eclipse Feature (GEF).
GEF Feature depends on plugin (org.eclipse.gef)
GEF Feature depends on plugin (org.eclipse.draw2d)
etc.
and then include all the dependencies "automagically", assuming they are
available to the PDE Build?
Thanks
Ben
|
|
|
Re: Feature-based product and specifying what plug-ins to include [message #333761 is a reply to message #333759] |
Fri, 02 January 2009 20:58 |
Eclipse User |
|
|
|
Originally posted by: bsv.datatel.com
I might be able to re-phrase this question in a simpler way.
If you wanted to add a known feature (say,
"org.eclipse.birt.report.runtime.feature.group") to a feature-based
product, how would you do it?
Ben Vitale wrote:
> Let's say have a couple features like this.
>
> Company Feature A
> - Company Plugin A
> - Depends on GEF Feature
>
> Company Feature B
> - Company Plugin B
> - Depends on BIRT Feature
>
> Now I want to build an Eclipse product with these features. So I create
> a single "product feature", and include the two features above.
>
> Then I create a ".product" file, and include the single product feature.
>
> Is this sufficient for the PDE/Build to know what plugins need to be
> packaged when the product build runs? 'Cause right now, we're manually
> specifying a bunch of stuff on the "Plug-ins and Fragments" tab of the
> product feature. This seems like a duplication of what is already
> specified in plugin.xml and feature.xml for the above items.
>
> I guess the question is, does the product build work its way down the
> hierarchy, like...
>
> Product depends on Company Feature A.
> Company Feature A depends on Company Plugin A
> Company Feature A depends on Eclipse Feature (GEF).
> GEF Feature depends on plugin (org.eclipse.gef)
> GEF Feature depends on plugin (org.eclipse.draw2d)
> etc.
>
> and then include all the dependencies "automagically", assuming they are
> available to the PDE Build?
>
> Thanks
> Ben
|
|
| |
Re: Feature-based product and specifying what plug-ins to include [message #333802 is a reply to message #333761] |
Tue, 06 January 2009 16:17 |
Andrew Niefer Messages: 990 Registered: July 2009 |
Senior Member |
|
|
Normal behaviour is that the build will automatically package everything
that is _included_ in the feature tree. This is different from things
that are _required_.
If Feature A requires GEF, building feature A results in only the
contents of A, and it is expect that you install A into something that
already includes GEF.
If Feature A includes GEF, then building feature A will result in a
package that also includes both A and GEF.
Note that things change a little in the context of p2. In p2,
everything is a requires relationship. With p2 if, for example, you
have a p2 repo containing BIRT & GEF, then build your product to
generate metadata to that same repo. You can then use the p2 director
to install the product which pulls in everything you need.
It comes down to the difference between build's packaging and p2's
installing. In your example, build won't include GEF & BIRT in the
package (I'm assuming your depends on == requires), but a p2 install will.
As for "org.eclipse.birt.report.runtime.feature.group", this looks like
a p2 IU name. In p2 metadata there are 2 IUs representing a feature,
the feature IU itself for the feature jar, and a group IU which sets up
requires on all the things referenced by the feature. That looks like
the feature group id corresponding to the
"org.eclipse.birt.report.runtime" feature. To include this in your
product, list the org.eclipse.birt.report.runtime feature in the
..product and the metadata generation will take care of pulling in the
feature.group.
-Andrew
Ben Vitale wrote:
> I might be able to re-phrase this question in a simpler way.
>
> If you wanted to add a known feature (say,
> "org.eclipse.birt.report.runtime.feature.group") to a feature-based
> product, how would you do it?
>
> Ben Vitale wrote:
>> Let's say have a couple features like this.
>>
>> Company Feature A
>> - Company Plugin A
>> - Depends on GEF Feature
>>
>> Company Feature B
>> - Company Plugin B
>> - Depends on BIRT Feature
>>
>> Now I want to build an Eclipse product with these features. So I
>> create a single "product feature", and include the two features above.
>>
>> Then I create a ".product" file, and include the single product feature.
>>
>> Is this sufficient for the PDE/Build to know what plugins need to be
>> packaged when the product build runs? 'Cause right now, we're
>> manually specifying a bunch of stuff on the "Plug-ins and Fragments"
>> tab of the product feature. This seems like a duplication of what is
>> already specified in plugin.xml and feature.xml for the above items.
>>
>> I guess the question is, does the product build work its way down the
>> hierarchy, like...
>>
>> Product depends on Company Feature A.
>> Company Feature A depends on Company Plugin A
>> Company Feature A depends on Eclipse Feature (GEF).
>> GEF Feature depends on plugin (org.eclipse.gef)
>> GEF Feature depends on plugin (org.eclipse.draw2d)
>> etc.
>>
>> and then include all the dependencies "automagically", assuming they
>> are available to the PDE Build?
>>
>> Thanks
>> Ben
|
|
|
Re: Feature-based product and specifying what plug-ins to include [message #333808 is a reply to message #333802] |
Tue, 06 January 2009 22:18 |
Eclipse User |
|
|
|
Originally posted by: bsv.datatel.com
Thanks for clarifying the bit about includes vs requires. That was quite
helpful.
Andrew Niefer wrote:
> Normal behaviour is that the build will automatically package everything
> that is _included_ in the feature tree. This is different from things
> that are _required_.
>
> If Feature A requires GEF, building feature A results in only the
> contents of A, and it is expect that you install A into something that
> already includes GEF.
> If Feature A includes GEF, then building feature A will result in a
> package that also includes both A and GEF.
>
> Note that things change a little in the context of p2. In p2,
> everything is a requires relationship. With p2 if, for example, you
> have a p2 repo containing BIRT & GEF, then build your product to
> generate metadata to that same repo. You can then use the p2 director
> to install the product which pulls in everything you need.
>
> It comes down to the difference between build's packaging and p2's
> installing. In your example, build won't include GEF & BIRT in the
> package (I'm assuming your depends on == requires), but a p2 install will.
>
> As for "org.eclipse.birt.report.runtime.feature.group", this looks like
> a p2 IU name. In p2 metadata there are 2 IUs representing a feature,
> the feature IU itself for the feature jar, and a group IU which sets up
> requires on all the things referenced by the feature. That looks like
> the feature group id corresponding to the
> "org.eclipse.birt.report.runtime" feature. To include this in your
> product, list the org.eclipse.birt.report.runtime feature in the
> .product and the metadata generation will take care of pulling in the
> feature.group.
>
> -Andrew
|
|
|
Goto Forum:
Current Time: Mon Dec 30 17:11:48 GMT 2024
Powered by FUDForum. Page generated in 0.03590 seconds
|