[osgi-dev] Jars as bundle

Stuart McCulloch stuart.mcculloch at jayway.net
Wed Apr 25 12:16:28 EDT 2007


On 25/04/07, Aggelos Mpimpoudis <a.mpimpoydhs at di.uoa.gr> wrote:
> Stuart McCulloch wrote:
> > er, on the screenshot where you say you cannot add anything there
> > is an 'add...' button - do you mean that this button does nothing, or
> > that it opens a window, but the jar you want to add isn't available?
> >
> The second one...It opens a window and there is an empty list.
> > also, have you tried clicking on the 'bundle.manifest' tab (third tab
> > along near the bottom) as this should let you edit the file directly.
> >
> When I add the Bundle-Classpath manifest header and press save the line
> dissappears and the tool itself proposes to import the package (which
> doesn't make any sense because it isn't a bundle what I am trying to import)
> > btw, the screenshots suggest you're using the Knopflerfish OSGi
> > plugin for Eclipse - this is not the only way to develop bundles in
> > Eclipse, other ways include creating a 'PDE' project (in v3.2) or
> > using the Bnd plugin.
> Bnd same thing....reproduces same erroneous state when I add manually
> the classpath directive.

It sounds like the Knopflerfish OSGi plugin doesn't like embedded jars,
and is automatically updating the manifest whenever anything changes
in the project (which may be why using bnd didn't work).

This is not really the best place to resolve this, as this is the general
OSGi mailing list - info at knopflerfish.org would be more appropriate.

That said, you might want to try creating a new plugin (PDE) project
using Eclipse 3.2 (without KF OSGi plugin!) or perhaps a new Java
project (again without the KF plugin) using the instructions at:

    http://www.aqute.biz/Snippets/SetupEclipse

I've successfully built and deployed bundles containing jars, so it
is definitely possible, but I've only done this using Eclipse / Bnd.

> >
> >
> > finally, the Knopflerfish site says the following about their plugin:
> >
> >    "Not all attributes can yet be set through the graphical view,
> >     e.g. Import-Package, Export-Package etc. For now you will
> >     have to set these attributes in the text view."
> >
> > so I'd suggest clicking on that 'bundle.manifest' tab and editing it
> > directly :)
> Well, I understand that I have got the support on a maximum level.
> Maybe there is something that I am doing wrong...
> Thx very much for your help! :-( :-( :-[ :-[ :-[ :-[
>
> Best Regards,
> Aggelos Mpimpoudis
>
> --
> Dept. of Informatics & Telecommunications, University of Athens
> Athens, Greece
> GSM +306942075153 / Msn: grnemo at hotmail.com
> mailto:a.mpimpoydhs at di.uoa.gr
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev at www2.osgi.org
> http://www2.osgi.org/mailman/listinfo/osgi-dev
>


-- 
Cheers, Stuart


More information about the osgi-dev mailing list