Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Unwanted bundles in the final product (optional dependencies)
Unwanted bundles in the final product (optional dependencies) [message #758970] Fri, 25 November 2011 12:28 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
Hi,

I just now saw a strange thing with one of our buckminster based builds. We have a system consisting of a server and a client part. Both features are included in the site feature. When I provision the client using director, some server bundles end up in the client. After I removed the server feature from the site, the client no longer contains these bundles. Also a PDE export of the client product does not include these server bundles.

I think this is some kind of an error. The client feature contains a bundle (org.springframework.context) which has optional dependencies to some JPA related server stuff. Buckminster resolves and includes these bundles in the client build although they are not included in the product.

Is there a simple workaround?

Best regards,
Peter
Re: Unwanted bundles in the final product (optional dependencies) [message #759035 is a reply to message #758970] Fri, 25 November 2011 17:49 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2011-11-25 13:28, Peter Kullmann wrote:
> Hi,
>
> I just now saw a strange thing with one of our buckminster based builds.
> We have a system consisting of a server and a client part. Both features
> are included in the site feature. When I provision the client using
> director, some server bundles end up in the client. After I removed the
> server feature from the site, the client no longer contains these
> bundles. Also a PDE export of the client product does not include these
> server bundles.
>
> I think this is some kind of an error. The client feature contains a
> bundle (org.springframework.context) which has optional dependencies to
> some JPA related server stuff. Buckminster resolves and includes these
> bundles in the client build although they are not included in the product.
>
> Is there a simple workaround?
It's normal for p2 to always include optional bundles in the install
when it can find them. This is somewhat annoying in some situations. Not
sure if that's applicable here though. The quick remedy would be to not
make a repository available to the p2 director that contains them.

- thomas
Re: Unwanted bundles in the final product (optional dependencies) [message #759292 is a reply to message #759035] Mon, 28 November 2011 09:49 Go to previous messageGo to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
Thanks, this makes sense.
Peter
Re: Unwanted bundles in the final product (optional dependencies) [message #774387 is a reply to message #759292] Tue, 03 January 2012 20:20 Go to previous message
R. Oldenburg is currently offline R. OldenburgFriend
Messages: 24
Registered: September 2011
Junior Member
Hi there,

maybe I can help...
I had the same problem with some plugins that extend equinox p2 and register some custom touchpoints.
They have some optional deps to some of my own custom plugins. The "optional" tag is important for this plugin to also work in an eclipse installation which is missing the other custom plugins.

Anyway, the solution for me was to set up a p2.inf which explicitly, redundantly defines the dependency as optional:

Let's say you have 2 optional deps to org.custom.ui and org.custom.ui.views using "resolution:=optional" in the manifest of your bundle.

Then the "META-INF/p2.inf" would like the following:
requires.1.namespace=osgi.bundle
requires.1.name=org.custom.ui
requires.1.greedy=false
requires.1.optional=true

requires.2.namespace=osgi.bundle
requires.2.name=org.custom.ui.views
requires.2.greedy=false
requires.2.optional=true

Don't know if the greedy line is necessary. For me this works perfectly. p2 director does not install these optional deps into the running platform when installing/updating the bundle itself.

BTW: Maybe my new proposal for an "internal p2 director call" through cspex could ease your configuration work and improve build performance.
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=358423 for code.
Previous Topic:How do you run findbugs in buckminster build?
Next Topic:Buckminster 3.6 - BuckyBook Ch 13 - Headless build
Goto Forum:
  


Current Time: Tue Apr 23 08:31:08 GMT 2024

Powered by FUDForum. Page generated in 0.03970 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top