On 6/28/07, Steven E. Harris <[EMAIL PROTECTED]> wrote:

Craig Ching <[EMAIL PROTECTED]> writes:

> AFAICT, the OSGi bundles aren't packaged as a single jar, they
> appear to be much more complex (or maybe I am lacking some
> understanding of how these bundles are packaged).  For instance, in
> WEB-INF/platform/plugins there are a number of directories with a
> fairly complex structure.

That's fine. I'd call that an "unpacked JAR", whether or not it was
ever rolled up into a JAR to begin with. Some OSGi frameworks can use
unpacked bundles, or, rather, bundles composed as directory structures
on disk. The only essential artifact that makes something a bundle is
a META-INF/MANIFEST.MF file with a few OSGi-specific headers. The
bundle can otherwise contain anything; it need not be compiled Java
class files, though that's the most common content.


Ah, ok, right, that makes sense.  Would the best way to approach this be to
jar up the bundle and shove into the maven repo with a groupId and
artifactId?  Then have some way to pull and unpack the jar in the right
place during the maven install goal?  This is starting to sound like that
maven-dependency-plugin/maven-antrun-plugin solution I was talking about,
here it is:

maven mailing list reference:
http://www.mail-archive.com/[email protected]/msg56352.html
the link that refers to:
http://www.mail-archive.com/[email protected]/msg56352.html

Sounds like that's the right way to approach this?


[...]

> Maybe I should also note that *none* of these are build-time
> dependencies for my project, maybe that makes a difference?  So this
> is just about packaging the BIRT viewer in my war file.

Well, do you consider composing your WAR file to be "build-time"? Are
you looking for Maven to help inject the bundle content into your WAR?

[...]



Ok, my bad, I really meant no compile time dependencies, just during the
maven install goal.  Yes, I want to put the various bundle dependencies into
the WEB-INF/platform/plugins directory during execution of the install goal.


Before I get to defining specific requirements, though, I'm going to
> need to get a better understanding of OSGi in general.  What project
> am I looking for when I'm ready for that then?

Apache Felix is an easy to understand OSGi framework implementation,
and somewhat confusingly under the same umbrella, they're collecting a
lot of other popular Java artifacts and repackaging them as OSGi
bundles.

You'll need an OSGi framework within which to test your
bundle. Eclipse Equinox¹ is another good choice. It's more complex
than Felix, but at present offers more capabilities. Knoplerfish² is
another option, but I don't have experience with it to comment
further.


Yeah, I know about Equinox and have played with Knopflerfish a bit, so felix
is an ASF sponsored OSGi implementation, sounds great!

Thanks for all your help Steve!


Footnotes:
¹ http://www.eclipse.org/equinox/
² http://www.knopflerfish.org/

--
Steven E. Harris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to