Package org.jboss.osgi.metadata

Examples of org.jboss.osgi.metadata.OSGiMetaDataBuilder


    void registerArquillianServiceWithOSGi(BundleManagerService bundleManager) {
        ModuleClassLoader classLoader = ((ModuleClassLoader) ArquillianService.class.getClassLoader());
        Module module = classLoader.getModule();
        if (bundleManager.getBundle(module.getIdentifier()) == null) {
            OSGiMetaDataBuilder builder = OSGiMetaDataBuilder.createBuilder("arquillian-service");
            builder.addExportPackages("org.jboss.arquillian.container.test.api", "org.jboss.arquillian.junit");
            builder.addExportPackages("org.jboss.arquillian.osgi", "org.jboss.arquillian.test.api");
            builder.addExportPackages("org.jboss.shrinkwrap.api", "org.jboss.shrinkwrap.api.asset", "org.jboss.shrinkwrap.api.spec");
            builder.addExportPackages("org.junit", "org.junit.runner");
            try {
                log.infof("Register arquillian service with OSGi layer");
                bundleManager.registerModule(serviceTarget, module, builder.getOSGiMetaData());
            } catch (BundleException ex) {
                log.errorf(ex, "Cannot register arquillian service with OSGi layer");
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.osgi.metadata.OSGiMetaDataBuilder

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.