cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: [RT] The impact of using OSGi
Date Mon, 25 Jul 2005 10:57:30 GMT
Carsten Ziegeler wrote:
> Upayavira wrote:
>>Can someone explain how maven/OSGi would play together? OSGi has the 
>>ability to download and install packages. It doesn't though have any 
>>dependency resolution stuff in it. Does Maven provide that? However, 
>>IIUC, Maven is a build-time tool, and any dependency resolution we use 
>>should be usable at runtime (even if that isn't always the best time to 
>>do it). Could Maven handle this usecase too?
> As you said Maven is a build-time tool, so we should use it for that
> case. afaiu OSGi will do all the run-time stuff for us.

Well, no, it doesn't. OSGi by default doesn't do any dependency 
resolution. Either by package, or by 'block'. In which case, if we use 
Maven for it at build time, we're still stuck with a need for it at 
deploy time, which seems a little odd.

> But we need something that can compile our java code. In Maven you
> simply define on which other projects/jars you depend and maven does the
> downloading/resolution stuff and then compiles your code.

Building when you depend on java code in other bundles isn't that easy. 
For one, you may depend upon java classes which are in a jar embedded 
within another jar. Java/ant can't handle that. Secondly, the bundle you 
are depending upon might only export some of its classes. Ant can't 
specify only certain classes in its classpath (I dunno if Maven can 
handle this). So, the only solution we were able to come up with was to 
explode the dependency bundle's jar, only extracting the exported 

This seems to me to be an OSGi specific problem, which, to my mind, 
would be best sorted in an OSGi context.

> And we need a tool that creates a bundle out of the source tree
> (creating a jar, building the manifest, stuffing all resources into it
> etc.). There will be a Maven plugin for this, I think, so we could
> simply use it.

Well, once you've exploded your dependencies, building a bundle should 
be pretty trivial, shouldn't it?

> But I agree that there are some more questions, so I think we should
> simply experiment a little bit with one block, like Bertrand suggested,
> and see what the outcome is.

Yup, definitely.


View raw message