Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] optional dependencies in materialized products with tycho 0.14.0

Thanks Igor.

Bundle B's metadata looks like:

    <requires size='220'>
      <required namespace='java.package' name='a.b.c' range='0.0.0' optional='true'/>

I guess this means the bundle was produced by an earlier p2 since greedy is by default set to true, and  when I build my own bundles with optional dependencies using tycho 0.14.0, the p2 metadata looks like:

    <requires size='14'>
      <required namespace='java.package' name='a.b.c' range='0.0.0' optional='true' greedy='false'/>

Looks like I will have to filter the target platform or get bundle B rebuilt using a newer p2.  Please let me know if I misunderstood something here.

Regards and thanks again,

-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
Sent: Friday, February 24, 2012 3:50 AM
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] optional dependencies in materialized products with tycho 0.14.0

How did you build bundle B and more importantly its p2 metadata? If p2
metadata of bundle B was produced by p2 3.7 or earlier, then dependency
on bundle C is marked as greedy, which triggers installation on bundle
C. The only way to exclude bundle C is to filter it out from the target


On 12-02-24 2:41 AM, Lau, Philip wrote:
> Hi,
> I realize this topic has been repeatedly discussed in the past, but I'd
> like to ask what I should expect using tycho 0.14.0.
> It's about optional dependencies showing up in materialized products.
> Say I have bundle A built inside my reactor, and it has a require-bundle
> dependency on bundle B. Bundle B is not built in the reactor and is
> found in the target-platform. Bundle B has a number of optional
> import-package directives, and some of those optional packages are
> exported by other bundles (e.g. bundle C) also found in the target-platform.
> Before using tycho, the materialized product contains bundles A and B.
> Using tycho 0.14.0 eclipse-repository, the materialized product contains
> bundles A, B and C.
> After reviewing some older posts, there have been suggestions to:
> 1. use p2.inf to make dependency resolution not greedy
> 2. restrict the target-platform
> 3. wait for or use newer versions of P2 [1]
> Just wondering if there is any updated guidance on how I can use
> eclipse-repository, and materialize products without the optional
> dependencies?
> Thanks,
> Philip
> [1]
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
tycho-user mailing list

Back to the top