Hi all,
I am using Spring DM server 1.0 and the Eclipse plugin, and searching for ideas to solve the following problem:
In a project with lots of bundles and dependencies, it would be great when it is possible to use bundles as binary dependency, without the need to have all projects open in Eclipse. We used to do this by creating 'library bundles' (for example an orm bundle) which reexports its dependencies (for example all hibernate related jars). The concept of libraries as introduced with Spring DM seems to be a more elegant solution and solves lots of problems with split packages and conflicts (since all packages exported by the imported bundles are explicitly imported using Import-Package). I think (but maybe I am wrong, I am very open for suggestions) the ultimate goal is you have only the one or a few projects open on which you are working, the others are imported as binaries, with optional source attachment.
Now the question is: is there a possibility to combine binary dependencies with the library concept? I have tried the following:
- Export the bundle, leave the Import-Library headers in the manifest. I have placed the jar into the repository/bundles/usr directory. In Eclipse, I can use the bundle as required or imported bundle, but I do not see any bundles from the library in the Bundle Dependencies tree. At runtime, no bundles can resolve any classes from the library.
- Same as above, but placed the jar in the pickup directory. Does not work, because the Eclipse plugin does not see the bundles in the pickup directory.
With these two options, I am out of inspiration.. To summarize, I have the following questions:
- Am I on the right track? Is the binary depencies approach a good approach to eliminate time-consuming Eclipse workspace rebuilds and increase developer productivity, or are the better solutions (I am open for all suggestions)?
- Is there a possibility to use binary dependencies with Spring DM Server, when the Spring DM specific headers are used? If yes, where should I place these binaries?
- Should the repository contain only pure OSGi bundles (= no Spring specific headers)? If yes, what is the way to convert the Import-Library and Import-Bundle headers to Import-Package?
- Which bundles should be in the repository? Is it only for OSGi-fied third party jars, where should I copy my own binaries to?
Thanks in advance for your time and responses.
Regards,
Daniël



