public static JavaArchive createDeployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jaxrs-osgi-target");
archive.addClasses(HttpRequest.class, Echo.class, TargetBundleActivator.class);
archive.setManifest(new Asset() {
public InputStream openStream() {
OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
builder.addBundleSymbolicName(archive.getName());
builder.addBundleManifestVersion(2);
builder.addBundleActivator(TargetBundleActivator.class);
builder.addImportPackages(BundleActivator.class, ModuleIdentifier.class, Logger.class);
return builder.openStream();
}
});
return archive;
}