View Full Version : Creating custom ArtifactLocator for Integration Tests
janblankenhorn
Jun 17th, 2008, 02:52 AM
Hi,
as I don't use the standard mavan approach for building my osgi environment, i thought about creating a custom ArtifactLocator which loads bundle-projects from my workspace instead of .jar Files from a specified location.
Is it possible to use non-packaged bundle projects instead of jar'ed bundles ?
janblankenhorn
Jun 17th, 2008, 03:22 AM
Am i right that this won't work yet?
Or can a non jar'ed bundle be encapsulated in a Spring Resource?
Thanks a alot!!!
Costin Leau
Jun 20th, 2008, 08:23 AM
OSGi doesn't allow the installation of bundles that are unpacked - Equinox I believe however has some sort of functionality. The integration test simply opens the stream associated with the resource to install the bundle since it's a generic way that works across all OSGi implementations (which what Spring-DM supports).
For your case, you could try to override the test and instead of using the default install, you could provide a dedicated Equinox install method for bundles that are unpacked (which can still be represented as a resource).
Additionally you could try to create a dedicated Resource that can automatically can create a special, archive on the fly stream so as far as the OSGi platform is concerned, the source is still a jar/stream of some sort.
Ideally they should not depend on the jar format and the inputstream itself should be enough but this might not be the case.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.