BndTools osgi launcher

560 views
Skip to first unread message

Dave Smith

unread,
Jan 16, 2013, 3:13:31 PM1/16/13
to bndtool...@googlegroups.com
In the bndtools launcher you set the launch.system.packages to the value of the Export-Package manifest entry of the osgi container you are starting. Then in the aQute.launcher.Launcher you step on the org.osgi.framework.system.packages.extra value with the systemPackage value

snip....

if (parms.systemPackages != null) {
            p.setProperty(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, parms.systemPackages);



I am trying to use the org.osgi.framework.system.packages.extra which does not work. I would suggest that if launching equinox that you should not be setting the launch.system.packages at all and let equinox load the profile based on VM.

Neil Bartlett

unread,
Jan 16, 2013, 3:24:20 PM1/16/13
to bndtool...@googlegroups.com
The bnd(tools) launcher does not set the "org.osgi.framework.system.packages" property. So Equinox does actually load that from its internal profile. We only set the "org.osgi.framework.system.packages.extra" property.

Neil

Dave Smith

unread,
Jan 16, 2013, 3:27:13 PM1/16/13
to bndtool...@googlegroups.com
Really ...

From my ~/Documents/workspace/Launch/.bundles/launch5396474706777573688.properties

launch.system.packages=org.eclipse.osgi.event;version\="1.0",org.eclipse.osgi.framework.console;version\="1.1",org.eclipse.osgi.framework.eventmgr;version\="1.2",org.eclipse.osgi.framework.log;version\="1.1",org.eclipse.osgi.launch;version\="1.0",org.eclipse.osgi.service.datalocation;version\="1.3",org.eclipse.osgi.service.debug;version\="1.2",org.eclipse.osgi.service.environment;version\="1.3",org.eclipse.osgi.service.localization;version\="1.1",org.eclipse.osgi.service.pluginconversion;version\="1.0",org.eclipse.osgi.service.resolver;version\="1.6",org.eclipse.osgi.service.resolver.extras;version\="1.0";x-friends\:\="org.eclipse.equinox.resolver",org.eclipse.osgi.service.runnable;version\="1.1",org.eclipse.osgi.service.security;version\="1.0",org.eclipse.osgi.service.urlconversion;version\="1.0",org.eclipse.osgi.signedcontent;version\="1.0",org.eclipse.osgi.storagemanager;version\="1.0",org.eclipse.osgi.util;version\="1.1",org.eclipse.equinox.log;version\="1.0",org.osgi.framework;version\="1.7",org.osgi.framework.launch;version\="1.1",org.osgi.framework.hooks.bundle;version\="1.1",org.osgi.framework.hooks.resolver;version\="1.0",org.osgi.framework.hooks.service;version\="1.1",org.osgi.framework.hooks.weaving;version\="1.0",org.osgi.framework.namespace;version\="1.0",org.osgi.framework.startlevel;version\="1.0",org.osgi.framework.wiring;version\="1.1",org.osgi.resource;version\="1.0",org.osgi.service.condpermadmin;version\="1.1.1",org.osgi.service.framework;version\="1.0";x-internal\:\=true,org.osgi.service.log;version\="1.3",org.osgi.service.packageadmin;version\="1.2",org.osgi.service.permissionadmin;version\="1.2",org.osgi.service.startlevel;version\="1.1",org.osgi.service.url;version\="1.0",org.osgi.util.tracker;version\="1.5.1",org.eclipse.core.runtime.adaptor;x-friends\:\="org.eclipse.core.runtime",org.eclipse.core.runtime.internal.adaptor;x-internal\:\=true,org.eclipse.core.runtime.internal.stats;x-friends\:\="org.eclipse.core.runtime",org.eclipse.osgi.baseadaptor;x-internal\:\=true,org.eclipse.osgi.baseadaptor.bundlefile;x-internal\:\=true,org.eclipse.osgi.baseadaptor.hooks;x-internal\:\=true,org.eclipse.osgi.baseadaptor.loader;x-internal\:\=true,org.eclipse.osgi.framework.adaptor;x-internal\:\=true,org.eclipse.osgi.framework.debug;x-internal\:\=true,org.eclipse.osgi.framework.internal.core;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol.bundleentry;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol.bundleresource;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol.reference;x-internal\:\=true,org.eclipse.osgi.framework.internal.reliablefile;x-internal\:\=true,org.eclipse.osgi.framework.util;x-internal\:\=true,org.eclipse.osgi.internal.baseadaptor;x-internal\:\=true,org.eclipse.osgi.internal.composite;x-internal\:\=true,org.eclipse.osgi.internal.loader;x-internal\:\=true,org.eclipse.osgi.internal.loader.buddy;x-internal\:\=true,org.eclipse.osgi.internal.module;x-internal\:\=true,org.eclipse.osgi.internal.profile;x-internal\:\=true,org.eclipse.osgi.internal.resolver;x-internal\:\=true,org.eclipse.osgi.internal.serviceregistry;x-internal\:\=true,org.eclipse.osgi.internal.permadmin;x-internal\:\=true,org.eclipse.osgi.internal.provisional.service.security;x-friends\:\="org.eclipse.equinox.security.ui";version\="1.0.0",org.eclipse.osgi.internal.provisional.verifier;x-friends\:\="org.eclipse.update.core,org.eclipse.ui.workbench,org.eclipse.equinox.p2.artifact.repository",org.eclipse.osgi.internal.service.security;x-friends\:\="org.eclipse.equinox.security.ui",org.eclipse.osgi.internal.signedcontent;x-internal\:\=true,org.eclipse.osgi.service.internal.composite;x-internal\:\=true,org.eclipse.equinox.log.internal;x-internal\:\=tr


I am using 2.0 ..

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413

Neil Bartlett

unread,
Jan 16, 2013, 3:29:50 PM1/16/13
to bndtool...@googlegroups.com
Yes but as the snippet of code you pasted showed, we don't use that property to set org.osgi.framework.system.packages.

Dave Smith

unread,
Jan 16, 2013, 3:31:54 PM1/16/13
to bndtool...@googlegroups.com
Sure does ...

aQute.launcher.constants.LauncherConstants


final static String            LAUNCH_SYSTEMPACKAGES        = "launch.system.packages";

..

public LauncherConstants(Properties p) {
       .....
        systemPackages = p.getProperty(LAUNCH_SYSTEMPACKAGES);
      ...
        Map<String,String> map = (Map) p;
        runProperties.putAll(map);
    }




Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


Neil Bartlett

unread,
Jan 16, 2013, 3:34:49 PM1/16/13
to bndtool...@googlegroups.com
Sure doesn't ;-)

Here's the snippet you pasted:


if (parms.systemPackages != null) {
     p.setProperty(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, parms.systemPackages);



Dave Smith

unread,
Jan 16, 2013, 4:53:42 PM1/16/13
to bndtool...@googlegroups.com

this.parms = new LauncherConstants(properties); 

Where properties is loaded from the launcher.properties file

Try running a config with a bundle that uses javax.xml or org.w3c.dom the bundle with not resolve.


I

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


Peter Kriens

unread,
Jan 17, 2013, 3:15:12 AM1/17/13
to bndtool...@googlegroups.com
I tried to use org.w3c.dom and javax.xml and both worked fine with Eclipse?

bnd never touches the org.osgi.framework.system.packages property, it only sets the org.osgi.framework.system.packages.extra from its own launch.systempackages constants, as Neil showed.

It is highly unlikely you're looking in the right direction since many things would not work at all if we overrode the packages list of the framework.

In case you might wonder, the current extra list is derived as far as I remember from the framework's JAR export list.

Kind regards,

Peter Kriens

Neil Bartlett

unread,
Jan 17, 2013, 3:18:30 AM1/17/13
to bndtool...@googlegroups.com
Bundles with javax.xml and org.w3x.dom as imports resolve and work fine.

I don't doubt that you have encountered some kind of problem, I just think you are looking in the wrong place for the cause. It would be helpful if you could show the details of the errors you are getting and we can investigate from there.

Regards
Neil

Rafał Krzewski

unread,
Jan 17, 2013, 5:06:06 AM1/17/13
to bndtool...@googlegroups.com
At some point I was trying to use org.osgi.framework.system.packages.extra with bndtools launcher, but I was not able to get it to fly.

My usecase was that Scala 2.10 uses sun.misc.Unsafe in it's scala.concurrent implmentation. I was able to make the bundle resolvable by making this import optional, but I didn't need scala.concurrent for the little toy program I was playing with. However, out of curiosity tried to make the framework wire sun.misc package to scala.concurrent.

Here are two minimized example lauch descriptors:

# felix_extra.bndrun

-runfw: org.apache.felix.framework;version='[4,5)'
-runee: JavaSE-1.6

-runbundles: org.apache.felix.gogo.command;version='[0.12.0,0.12.1)',\
org.apache.felix.gogo.runtime;version='[0.10.0,0.10.1)',\
org.apache.felix.gogo.shell;version='[0.10.0,0.10.1)'

-runrequires:\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)'
-runproperties: org.osgi.framework.system.packages.extra=sun.misc

# equinox_extra.bndrun

-runfw: org.eclipse.osgi;version='[3.7,4)'
-runee: JavaSE-1.6

-runbundles: org.apache.felix.gogo.command;version='[0.12.0,0.12.1)',\
org.apache.felix.gogo.runtime;version='[0.10.0,0.10.1)',\
org.apache.felix.gogo.shell;version='[0.10.0,0.10.1)'

-runrequires: osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)'

-runproperties: org.osgi.framework.system.packages.extra=sun.misc


After starting the framework, I'm running the following comand in gogo shell

inspect capability osgi.wiring.package 0

And I expect to find sun.misc among the packages exported by the system bundle. It is not. Am I doing this right? Or maybye sun.* packages are special and cannot be exported?

Cheers,
Rafał

Michiel Vermandel

unread,
Jan 17, 2013, 5:16:33 AM1/17/13
to bndtool...@googlegroups.com
Hi,

Is it possible to modify the org.osgi.framework.system.packages property? I do need this as the standard Felix org.osgi.framework.system.packages needs to be modified if one wants to work with apache aries blueprint bundles.
Else one gets a resolution conflict (multiple paths)
Thanks,
Michiel

Ferry Huberts

unread,
Jan 17, 2013, 5:25:11 AM1/17/13
to bndtool...@googlegroups.com

On 17/01/13 11:06, Rafał Krzewski wrote:
At some point I was trying to use org.osgi.framework.system.packages.extra with bndtools launcher, but I was not able to get it to fly.


Same for me.
This works though:

-runproperties: \
    org.osgi.framework.bootdelegation=sun.*,com.sun.*



launch.system.packages=org.eclipse.osgi.event;version\="1.0",org.eclipse.osgi.framework.console;version\="1.1",org.eclipse.osgi.framework.eventmgr;version\="1.2",org.eclipse.osgi.framework.log;version\="1.1",org.eclipse.osgi.launch;version\="1.0",org.eclipse.osgi.service.datalocation;version\="1.3",org.eclipse.osgi.service.debug;version\="1.2",org.eclipse.osgi.service.environment;version\="1.3",org.eclipse.osgi.service.localization;version\="1.1",org.eclipse.osgi.service.pluginconversion;version\="1.0",org.eclipse.osgi.service.resolver;version\="1.6",org.eclipse.osgi.service.resolver.extras;version\="1.0";x-friends\:\="org.eclipse.equinox.resolver",org.eclipse.osgi.service.runnable;version\="1.1",org.eclipse.osgi.service.security;version\="1.0",org.eclipse.osgi.service.urlconversion;version\="1.0",org.eclipse.osgi.signedcon tent;vers ion\="1.0",org.eclipse.osgi.storagemanager;version\="1.0",org.eclipse.osgi.util;version\="1.1",org.eclipse.equinox.log;version\="1.0",org.osgi.framework;version\="1.7",org.osgi.framework.launch;version\="1.1",org.osgi.framework.hooks.bundle;version\="1.1",org.osgi.framework.hooks.resolver;version\="1.0",org.osgi.framework.hooks.service;version\="1.1",org.osgi.framework.hooks.weaving;version\="1.0",org.osgi.framework.namespace;version\="1.0",org.osgi.framework.startlevel;version\="1.0",org.osgi.framework.wiring;version\="1.1",org.osgi.resource;version\="1.0",org.osgi.service.condpermadmin;version\="1.1.1",org.osgi.service.framework;version\="1.0";x-internal\:\=true,org.osgi.service.log;version\="1.3",org.osgi.service.packageadmin;version\="1.2",org.osgi.service.permissionadmin;version\ ="1.2",org.osgi.service.startlevel;version\="1.1",org.osgi.service.url;version\="1.0",org.osgi.util.tracker;version\="1.5.1",org.eclipse.core.runtime.adaptor;x-friends\:\="org.eclipse.core.runtime",org.eclipse.core.runtime.internal.adaptor;x-internal\:\=true,org.eclipse.core.runtime.internal.stats;x-friends\:\="org.eclipse.core.runtime",org.eclipse.osgi.baseadaptor;x-internal\:\=true,org.eclipse.osgi.baseadaptor.bundlefile;x-internal\:\=true,org.eclipse.osgi.baseadaptor.hooks;x-internal\:\=true,org.eclipse.osgi.baseadaptor.loader;x-internal\:\=true,org.eclipse.osgi.framework.adaptor;x-internal\:\=true,org.eclipse.osgi.framework.debug;x-internal\:\=true,org.eclipse.osgi.framework.internal.core;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol.bundl eentry;x- internal\:\=true,org.eclipse.osgi.framework. internal.protocol.bundleresource;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol.reference;x-internal\:\=true,org.eclipse.osgi.framework.internal.reliablefile;x-internal\:\=true,org.eclipse.osgi.framework.util;x-internal\:\=true,org.eclipse.osgi.internal.baseadaptor;x-internal\:\=true,org.eclipse.osgi.internal.composite;x-internal\:\=true,org.eclipse.osgi.internal.loader;x-internal\:\=true,org.eclipse.osgi.internal.loader.buddy;x-internal\:\=true,org.eclipse.osgi.internal.module;x-internal\:\=true,org.eclipse.osgi.internal.profile;x-internal\:\=true,org.eclipse.osgi.internal.resolver;x-internal\:\=true,org.eclipse.osgi.internal.serviceregistry;x-internal\:\=true,org.eclipse.osgi.internal.permadmin;x-internal\:\=true,org.eclipse.osgi.internal.provisional.service.sec urity;x-friends\:\="org.eclipse.equinox.security.ui"; version\="1.0.0",org.eclipse.osgi.internal.provisional.verifier;x-friends\:\="org.eclipse.update.core,org.eclipse.ui.workbench,org.eclipse.equinox.p2.artifact.repository",org.eclipse.osgi.internal.service.security;x-friends\:\="org.eclipse.equinox.security.ui",org.eclipse.osgi.internal.signedcontent;x-internal\:\=true,org.eclipse.osgi.service.internal.composite;x-internal\:\=true,org.eclipse.equinox.log.internal;x-internal\:\=tr


I am using 2.0 ..

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


On Wed, Jan 16, 2013 at 3:24 PM, Neil Bartlett <njbar...@gmail.com> wrote:
The bnd(tools) launcher does not set the "org.osgi.framework.system.packages" property. So Equinox does actually load that from its internal profile. We only set the "org.osgi.framework.system.packages.extra" property.

Neil



On Wed, Jan 16, 2013 at 8:13 PM, Dave Smith <dave....@candata.com> wrote:
In the bndtools launcher you set the launch.system.packages to the value of the Export-Package manifest entry of the osgi container you are starting. Then in the aQute.launcher.Launcher you step on the org.osgi.framework.system.packages.extra value with the systemPackage value

snip....

if (parms.systemPackages != null) {
            p.setProperty(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, parms.systemPackages);



I am trying to use the org.osgi.framework.system.packages.extra which does not work. I would suggest that if launching equinox that you should not be setting the launch.system.packages at all and let equinox load the profile based on VM.










-- 
Ferry Huberts

Neil Bartlett

unread,
Jan 17, 2013, 5:37:31 AM1/17/13
to bndtool...@googlegroups.com
Rather than using -runproperties to set this property directly I recommend using -runsystempackages. Then the resolver will take account of them during .bndrun resolution. 

--
Neil Bartlett
Sent from a phone

Ferry Huberts

unread,
Jan 17, 2013, 5:53:51 AM1/17/13
to bndtool...@googlegroups.com, Neil Bartlett

On 17/01/13 11:37, Neil Bartlett wrote:
Rather than using -runproperties to set this property directly I recommend using -runsystempackages. Then the resolver will take account of them during .bndrun resolution. 



Thanks, that works too ;-)

The only thing is that -runsystempackages doesn't support wildacards like sun.* while -runproperties does.

launch.system.packages=org.eclipse.osgi.event;version\="1.0",org.eclipse.osgi.framework.console;version\="1.1",org.eclipse.osgi.framework.eventmgr;version\="1.2",org.eclipse.osgi.framework.log;version\="1.1",org.eclipse.osgi.launch;version\="1.0",org.eclipse.osgi.service.datalocation;version\="1.3",org.eclipse.osgi.service.debug;version\="1.2",org.eclipse.osgi.service.environment;version\="1.3",org.eclipse.osgi.service.localization;version\="1.1",org.eclipse.osgi.service.pluginconversion;version\="1.0",org.eclipse.osgi.service.resolver;version\="1.6",org.eclipse.osgi.service.resolver.extras;version\="1.0";x-friends\:\="org.eclipse.equinox.resolver",org.eclipse.osgi.service.runnable;version\="1.1",org.eclipse.osgi.service.security;version\="1.0",org.eclipse.osgi.service.urlconversion;version\="1.0",org.eclipse.osgi.signedcon tent;vers ion\="1.0",org.eclipse.osgi.storagemanager;version\="1.0",org.eclipse.osgi.util;version\="1.1",org.eclipse.equinox.log;version\="1.0",org.osgi.framework;version\="1.7",org.osgi.framework.launch;version\="1.1",org.osgi.framework.hooks.bundle;version\="1.1",org.osgi.framework.hooks.resolver;version\="1.0",org.osgi.framework.hooks.service;version\="1.1",org.osgi.framework.hooks.weaving;version\="1.0",org.osgi.framework.namespace;version\="1.0",org.osgi.framework.startlevel;version\="1.0",org.osgi.framework.wiring;version\="1.1",org.osgi.resource;version\="1.0",org.osgi.service.condpermadmin;version\="1.1.1",org.osgi.service.framework;version\="1.0";x-internal\:\=true,org.osgi.service.log;version\="1.3",org.osgi.service.packageadmin;version\="1.2",org.osgi.service.permissionadmin; vers ion\ ="1.2",org.osgi.service.startlevel;version\="1.1",org.osgi.service.url;version\="1.0",org.osgi.util.tracker;version\="1.5.1",org.eclipse.core.runtime.adaptor;x-friends\:\="org.eclipse.core.runtime",org.eclipse.core.runtime.internal.adaptor;x-internal\:\=true,org.eclipse.core.runtime.internal.stats;x-friends\:\="org.eclipse.core.runtime",org.eclipse.osgi.baseadaptor;x-internal\:\=true,org.eclipse.osgi.baseadaptor.bundlefile;x-internal\:\=true,org.eclipse.osgi.baseadaptor.hooks;x-internal\:\=true,org.eclipse.osgi.baseadaptor.loader;x-internal\:\=true,org.eclipse.osgi.framework.adaptor;x-internal\:\=true,org.eclipse.osgi.framework.debug;x-internal\:\=true,org.eclipse.osgi.framework.internal.core;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol.bundl eentry;x- internal\:\=true,org.eclipse.osgi.framework. internal.protocol.bundleresource;x-internal\:\=true,org.eclipse.osgi.framework.internal.protocol.reference;x-internal\:\=true,org.eclipse.osgi.framework.internal.reliablefile;x-internal\:\=true,org.eclipse.osgi.framework.util;x-internal\:\=true,org.eclipse.osgi.internal.baseadaptor;x-internal\:\=true,org.eclipse.osgi.internal.composite;x-internal\:\=true,org.eclipse.osgi.internal.loader;x-internal\:\=true,org.eclipse.osgi.internal.loader.buddy;x-internal\:\=true,org.eclipse.osgi.internal.module;x-internal\:\=true,org.eclipse.osgi.internal.profile;x-internal\:\=true,org.eclipse.osgi.internal.resolver;x-internal\:\=true,org.eclipse.osgi.internal.serviceregistry;x-internal\:\=true,org.eclipse.osgi.internal.permadmin;x-internal\:\=true,org.eclipse.osgi.internal.provisional.service.sec urity;x-friends\:\="org.eclipse.equinox.security.ui"; version\="1.0.0",org.eclipse.osgi.internal.provisional.verifier;x-friends\:\="org.eclipse.update.core,org.eclipse.ui.workbench,org.eclipse.equinox.p2.artifact.repository",org.eclipse.osgi.internal.service.security;x-friends\:\="org.eclipse.equinox.security.ui",org.eclipse.osgi.internal.signedcontent;x-internal\:\=true,org.eclipse.osgi.service.internal.composite;x-internal\:\=true,org.eclipse.equinox.log.internal;x-internal\:\=tr


I am using 2.0 ..

Dave Smith
Candata Ltd.
416-493-9020x2413
Direct: 416-855-2413


On Wed, Jan 16, 2013 at 3:24 PM, Neil Bartlett <njbar...@gmail.com> wrote:
The bnd(tools) launcher does not set the "org.osgi.framework.system.packages" property. So Equinox does actually load that from its internal profile. We only set the "org.osgi.framework.system.packages.extra" property.

Neil



On Wed, Jan 16, 2013 at 8:13 PM, Dave Smith <dave....@candata.com> wrote:
In the bndtools launcher you set the launch.system.packages to the value of the Export-Package manifest entry of the osgi container you are starting. Then in the aQute.launcher.Launcher you step on the org.osgi.framework.system.packages.extra value with the systemPackage value

snip....

if (parms.systemPackages != null) {
            p.setProperty(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, parms.systemPackages);



I am trying to use the org.osgi.framework.system.packages.extra which does not work. I would suggest that if launching equinox that you should not be setting the launch.system.packages at all and let equinox load the profile based on VM.










--  
Ferry Huberts


-- 
Ferry Huberts

Rafał Krzewski

unread,
Jan 17, 2013, 6:17:05 AM1/17/13
to bndtool...@googlegroups.com
Brilliant! I can see the export now, and also scala-library is getting resolved properly even if sun.misc import is made non-optional.
What a neat hidden feature ;)

Cheers,
Rafał

Rafał Krzewski

unread,
Jan 17, 2013, 6:42:43 AM1/17/13
to bndtool...@googlegroups.com
On a related note: I was trying to circumvent the problem by creating a fragment bundle that would attach to the system bundle and export the required package - someone suggested this solution on the list a while ago.

I've created a bundle with the following bnd.bnd file:

Fragment-Host: system.bundle;extension:=framework
Export-Package: sun.misc

But I've run into two problems: Export-Package header was missing from the generated bundle manifest. Only Fragment-Host header went through. I also got a warning that my bnd file does not specify any content to be included.

When I hacked the bundle by hand to include the header and loaded into a local repository, the resolver was not able to figure out the wiring for scala-library. After short invesitgation I've come to realize that bndtools implementation of org.osgi.service.resolver.ResolveContext has insertHostedCapability stubbed in a not so subtle way :) IMO stuffing the capability blindly at the end would be better than throwing UOE, but I can't say I have a thorough understaing of Resolver spec.

Anyway, I found that Per was working on an implementation of hosted capabilities handing in https://github.com/bndtools/bnd/branches/resolvefixes branch but it appears to be left in limbo. Are there any plans to finish / integrate it before 2.0 ships?

Cheers,
Rafał

Rafał Krzewski

unread,
Jan 17, 2013, 6:57:18 PM1/17/13
to bndtool...@googlegroups.com


W dniu czwartek, 17 stycznia 2013 11:25:11 UTC+1 użytkownik Ferry Huberts napisał:

On 17/01/13 11:06, Rafał Krzewski wrote:
At some point I was trying to use org.osgi.framework.system.packages.extra with bndtools launcher, but I was not able to get it to fly.


Same for me.
This works though:

-runproperties: \
    org.osgi.framework.bootdelegation=sun.*,com.sun.*




The above does not work for me. First, there's a syntax problem: I see two runtime properties displayed in the wizard page:
 
org.osgi.framework.bootdelegation with value sun.*
com.sun.* with no value

shouldn't the comma be escaped somehow?

Second, no sun.* packages are exported by the system bundle.

Cheers,
Rafał

Neil Bartlett

unread,
Jan 17, 2013, 7:03:35 PM1/17/13
to bndtool...@googlegroups.com
Right.... the bootdelegation property does not cause the system bundle to export the packages. I think that Ferry meant to set the "org.osgi.framework.system.packages.extra" property, but as I said in follow up it is better to use -runsystempackages.

Neil

Peter Kriens

unread,
Jan 18, 2013, 2:52:47 AM1/18/13
to bndtool...@googlegroups.com
You to put the argument to the org.osgi.framework.bootdelegation property in quotes:

 org.osgi.framework.bootdelegation='sun.*,com.sun.*'

Any argument with commas need quotes ... reason should be obvious? ;-)

Kind regards,

Peter Kriens

Ferry Huberts

unread,
Jan 18, 2013, 3:06:26 AM1/18/13
to bndtool...@googlegroups.com
Well, it worked for me.
So my application just used sun.* then ;-)

No errors in bndtools.
-- 
Ferry Huberts

Peter Kriens

unread,
Jan 18, 2013, 3:12:28 AM1/18/13
to bndtool...@googlegroups.com
Talk on Skype?

Kind regards,

Peter Kriens
Reply all
Reply to author
Forward
0 new messages