Jorg Heymans wrote:

Hi,

I have just finished putting all blocks under m2 pom control, which
means that we are able to compile the whole of trunk using m2 - yay!
Great!

My next steps will be
- understand exactly what the RBGs (Real Block Guys) expect from maven
We expect a lot ;)

First, all real blocks are OSGi bundles (like the Eclipse 3+ pluggins), see http://wiki.apache.org/cocoon/osgi for links to documentation and previous discussions. There might be more to block building than the OSGi aspect, but for the time beeing it will be enough if we can build OSGi bundles with M2.

An OSGi bundle is a jar that can contain class files, resources and other jars, its Manifest.mf can contain a number of OSGi specific properties

From the build POV the most important OSGi manifest properties are: Export-Package, Import-Package, Bundle-Classpath and Require-Bundle (new in R4). These properties declare what packages a bundle export to other bundles, which packages it depends on, the bundle classpath (which defaults to '.') gives the possibility to add bundle internal jars to the classpath of the bundle. Require-Bundle imports all exported packages from a certain bundle. Observe that all import and export is done at the package level (even if there are possibiliites to use wildcards for chosing classes in R4). There are also an optional possibility so specify versions on packages (version ranges in R4).

From the above we can draw the conclusion that the build mechanism for bundles must be OSGi aware. If one bundle depend on another, the rules for what packages are exported (also from internal jars) must be respected. Also while packaging the bundles it must be possible to include jars. In the current ad hoc ant build system for bundles (tools/targets/osgi-build.xml) we just explode the bundles that other bundles depend on.

                         --- o0o ---

There is work on an M2 OSGi plugin http://docs.safehaus.org/display/OSGI/OSGi+Plugin+for+Maven2 on the Apache Felix list, see the archive: http://mail-archives.apache.org/mod_mbox/incubator-oscar-dev/ for discussions. If you are interested I suggest that you subscribe to the Felix list and join the work.

/Daniel

Reply via email to