Package org.jboss.osgi.spi

Examples of org.jboss.osgi.spi.ManifestBuilder


    public static JavaArchive createdeployment() {
        final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "example-bundlecontext");
        archive.setManifest(new Asset() {
            @Override
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                builder.addManifestHeader("Dependencies", "org.osgi.core");
                return builder.openStream();
            }
        });
        return archive;
    }
View Full Code Here


    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()),
View Full Code Here

        final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, MDB_DEPLOYMENT_NAME);
        archive.addClass(LifecycleCounterMDB.class);
        archive.setManifest(new Asset() {
            @Override
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                StringBuffer dependencies = new StringBuffer();
                dependencies.append(DEPLOYED_SINGLETON_MODULE);
                dependencies.append(" , org.hornetq.ra");
                builder.addManifestHeader("Dependencies", dependencies.toString());
                return builder.openStream();
            }
        });

        log.info(archive.toString(true));
        return archive;
View Full Code Here

        final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, SLSB_DEPLOYMENT_NAME);
        archive.addClass(LifecycleCounterSLSB.class);
        archive.setManifest(new Asset() {
            @Override
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                StringBuffer dependencies = new StringBuffer();
                dependencies.append(DEPLOYED_SINGLETON_MODULE);
                dependencies.append(" , org.hornetq.ra");
                builder.addManifestHeader("Dependencies", dependencies.toString());
                return builder.openStream();
            }
        });
        log.info(archive.toString(true));
        return archive;
    }
View Full Code Here

        WebArchive war = ShrinkWrap.create(WebArchive.class, "infinispan-resource-ref.war");
        war.addClasses(InfinispanBean.class, InfinispanResourceRefTestCase.class);
        war.addAsWebInfResource(getWebXml(), "web.xml");
        war.add(new Asset() {
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                builder.addManifestHeader("Dependencies", "org.infinispan export");
                return builder.openStream();
            }
        }, JarFile.MANIFEST_NAME);
        return war;
    }
View Full Code Here

        archive.addClasses(ClientModuleTwoActivator.class);
        String activatorPath = "META-INF/services/" + ServiceActivator.class.getName();
        archive.addAsResource("osgi/xservice/client-module-two/" + activatorPath, activatorPath);
        archive.setManifest(new Asset() {
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                builder.addManifestHeader("Dependencies", "org.osgi.core,org.jboss.modules,org.jboss.logging,org.jboss.osgi.framework,deployment.example-xservice-mab-target-bundle:0.0.0");
                return builder.openStream();
            }
        });
        return archive;
    }
View Full Code Here

        archive.addClass(SimpleRestEndpoint.class);
        archive.setWebXML("osgi/jaxrs/web.xml");
        // [SHRINKWRAP-278] WebArchive.setManifest() results in WEB-INF/classes/META-INF/MANIFEST.MF
        archive.add(new Asset() {
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                builder.addManifestHeader("Dependencies", "org.osgi.core,deployment.jaxrs-osgi-target:0.0.0");
                return builder.openStream();
            }
        }, JarFile.MANIFEST_NAME);
        return archive;
    }
View Full Code Here

        archive.addClasses(Echo.class, EchoService.class, TargetModuleActivator.class);
        String activatorPath = "META-INF/services/" + ServiceActivator.class.getName();
        archive.addAsResource("osgi/xservice/target-module/" + activatorPath, activatorPath);
        archive.setManifest(new Asset() {
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                builder.addManifestHeader("Dependencies", "org.jboss.modules,org.jboss.logging");
                return builder.openStream();
            }
        });
        return archive;
    }
View Full Code Here

        archive.addClasses(ClientModuleOneActivator.class);
        String activatorPath = "META-INF/services/" + ServiceActivator.class.getName();
        archive.addAsResource("osgi/xservice/client-module-one/" + activatorPath, activatorPath);
        archive.setManifest(new Asset() {
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                builder.addManifestHeader("Dependencies", "org.jboss.modules,org.jboss.logging,deployment.example-xservice-mam-target-module");
                return builder.openStream();
            }
        });
        return archive;
    }
View Full Code Here

        archive.addClasses(Echo.class, EchoService.class, TargetModuleActivator.class);
        String activatorPath = "META-INF/services/" + ServiceActivator.class.getName();
        archive.addAsResource("osgi/xservice/target-module/" + activatorPath, activatorPath);
        archive.setManifest(new Asset() {
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                builder.addManifestHeader("Dependencies", "org.jboss.modules,org.jboss.logging");
                return builder.openStream();
            }
        });
        return archive;
    }
View Full Code Here

TOP

Related Classes of org.jboss.osgi.spi.ManifestBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.