felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: Programmatic/non-shell-based interface to OBR
Date Wed, 29 Nov 2006 21:07:46 GMT

Steven E. Harris wrote:
> Looking (even) more closely, I must be mistaken. Here's what I saw in
> felix/trunk/bundlerepository/pom.xml:
>     <dependency>
>       <groupId>${pom.groupId}</groupId>
>       <artifactId>org.apache.felix.shell</artifactId>
>       <version>${pom.version}</version>
>     </dependency>
> That's a compile-time dependency, and Maven then assumes it must also
> be a runtime dependency.

Well, this dependency exists because the OBR impl does provide a shell 
command, so it needs to compile against it. I am not sure if I have the 
correct "scope" for the dependency since I am no maven expert.

> Later in pom.xml, there's this, as part of the manifest definition:
>   <Dynamic-ImportPackage>org.apache.felix.shell</Dynamic-ImportPackage>
> Is it correct that Dynamic-ImportPackage will only attempt to load the
> shell bundle if one touches a particular class or method in the
> bundlerepository bundle that needs the shell? Can I safely load the
> bundlerepository bundle without using the shell bundle?

First, I can see that you found a typo in my pom file...this should be 
DynamicImport-Package...I just changed this recently when I upgraded to 
the new maven plugin...oops, I will fix that now.

To answer your last question first, yes, you can use the OBR bundle 
without using the shell bundle.

Actually, that was the whole point of using Dynamic-ImportPackage for 
the OBR bundle. It will offer a shell command service if the package is 
available, otherwise it does not. The OBR bundle does a simple class 
loading probe to see if the shell package is available.

Dynamic-ImportPackage does not have anything to do with load a bundle, 
it has to do with whether an imported package is resolved at "resolve 
time" or at "run time". Import-Package packages are resolved at "resolve 
time", while DynamicImport-Package is resolved at "run time".

> I'll have to look into the API further. Perhaps that will answer all
> my questions.

Let us know if it doesn't.

> Well, I do have another question about embedding the framework and how
> to arrange that as part of a larger application, but I'll save that
> for a separate thread.

Ok, I am slowly working on documentation for that...you can see the 
start to it here:


> So far you've been very helpful.

No problem.

-> richard

View raw message