On 25/08/07, Richard S. Hall <[EMAIL PROTECTED]> wrote: > > Arash Amiri wrote: > > Hi, > > um... > > sometimes (I say "sometimes" because I really dont know what the cause > > is), a bundle, that I create with the maven-bundle-plugin, misses, > > once deployed, its own packages. > > > > e.g. I have a package "org.myapp.meta" in my maven project. > > I configure the maven bundle plugin (in the same project) the > > following way: > > ... > > <Import-Package>org.myapp.*;resolution:=optional</Import-Package> > > <Export-Package>org.myapp.*</Export-Package> > > ... > > > > when I deploy it in equinox, it gives me an error such as: > > Missing imported package org.myapp.meta > > I dont get this, since the jar file contains the package. > > > > Yet, I have to admit that the bundle has other dependencies which are > > not (yet) satifsfied. > > e.g. the org.myapp.meta package uses "org.openrdf.elmo" which is in a > > bundle not yet deployed (since I have to create it first).
if the 'org.myapp.meta' package depends on a non-deployed package then this could explain the equinox error (although it could be clearer!) if you still see the error with 'org.openrdf.elmo' deployed then please provide a testcase (or at least the poms + manifests + diag output). > > > my question: > > Is it a maven bundle plugin configuration issue or is it simply > > Equinox that refuses to import packages which have unresolved > references? > > Just a guess, since I don't really know how Equinox' resolver works, but > it could be that it is trying to resolve the bundle to its own export > since you import/export the same package, but it is unable to do so > because it cannot resolve the bundle itself, so the error message says > it cannot find the package because it cannot resolve the provider of the > package, which just happens to be the same bundle in this case. This > could potentially happen, depending on how Equinox handles bundles > importing their own packages. > > One question for you, why are you importing the same packages you are > exporting with an "optional" directive. Seems kind of strange and it > might be meaningless since the bundle will always have access to the > package since it exports them. > > Also, shouldn't this be on the Felix users mailing list? > > -> richard > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Cheers, Stuart
