Hi all,
I'm facing a design question regarding how to layout my project which is a
set of demo bundles for an OSGi book coming soon..
Saying I've got an OSGi servicecontained in a  com.foo.osgi.service.api Java
package, 2 implementation bundles:
both providing (export-package directive in MANIFEST.MF bundle descriptor)
and giving implementation for this service in com.foo.osgi.service.impl

A client bundle would import-package (to use the directive) and may fetch
the currently available implementation...
>From OSGi guru Peter Kriens point of view, it's a  good inhabit to repeat
the api classes in each of the implementation bundles

That 's where my problem starts...
i'd like to know a good Gradle wayhe api  to build such project saying I've
got:
OSGI-service-sample/
            + service-api
                   + src/main/java/com/foo ...
                   + build/com/foo/...

             + impl1
                    +src/main/java/com/foo/osgi/service/impl
                    + build/com/foo...

            + impl2
                    +src/main/java/com/foo/osgi/service/impl
                    + build/com/foo...
            + client-test
                    + src/main/java/com/.osgi/client
                    + build/com/foo/osgi/client/...

Compiling impl1 & impl2 require an access to api classes
Jar to be generated would contain  classes from:
com/foo/osg/iservice/.api
com/foo/osg/iservice/impl

Compiling client require access to the same  api classes

I don't know to translate this into a proper gradle build....
Multi project? Yes it seems trivial
How to customize the artefact generation to include required classes  in the
2 client bundles?
I will in a first step publish the 2 implementation bundles and the client
bundle into a local (file based) repository

The API does not need to be packaged as a bundle and may (opr not) be
published into the repository...

I hope my question is clear enough

Thanks for your help (advices)
Jerome

-- 
Jerome Moliere - Mentor/J
http://romjethoughts.blogspot.com/
auteur Eyrolles

Reply via email to