private Bundle installBundle(BundleContext context, Archive<?> archive) throws BundleException
{
// Export the bundle bytes
ZipExporter exporter = archive.as(ZipExporter.class);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter.exportZip(baos);
InputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
return context.installBundle(archive.getName(), inputStream);
}