Examples of ManifestBuilder


Examples of org.jboss.osgi.spi.ManifestBuilder

    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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        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

Examples of org.jboss.osgi.spi.ManifestBuilder

        loadableExtensions.add(InContainerManagementClientExtension.class.getName());

        // Generate the manifest with it's dependencies
        archive.setManifest(new Asset() {
            public InputStream openStream() {
                ManifestBuilder builder = ManifestBuilder.newInstance();
                StringBuffer dependencies = new StringBuffer();
                dependencies.append("org.jboss.as.jmx,");
                dependencies.append("org.jboss.as.server,");
                dependencies.append("org.jboss.as.controller-client,");
                dependencies.append("org.jboss.as.osgi,");
                dependencies.append("org.jboss.jandex,");
                dependencies.append("org.jboss.logging,");
                dependencies.append("org.jboss.modules,");
                dependencies.append("org.jboss.dmr,");
                dependencies.append("org.jboss.msc,");
                dependencies.append("org.jboss.osgi.framework,");
                dependencies.append("org.osgi.core");
                builder.addManifestHeader("Dependencies", dependencies.toString());
                return builder.openStream();
            }
        });

        // Add the ServiceActivator
        String serviceActivatorPath = "META-INF/services/" + ServiceActivator.class.getName();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.