public static JavaArchive createdeployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "example-module-reg");
archive.addClass(SimpleService.class);
archive.setManifest(new Asset() {
public InputStream openStream() {
ManifestBuilder builder = ManifestBuilder.newInstance();
builder.addManifestHeader("Dependencies", "org.osgi.core");
return builder.openStream();
}
});
archive.addAsManifestResource(new StringAsset(
Constants.BUNDLE_SYMBOLICNAME + ": " + archive.getName() + "\n" +
Constants.EXPORT_PACKAGE + ": " + SimpleService.class.getPackage().getName()),