Examples of OSGiMetaDataBuilder


Examples of org.apache.geronimo.deployment.util.osgi.OSGiMetaDataBuilder

        env.setConfigId(new Artifact(id.getGroupId(), id.getArtifactId() + "-DEPLOYMENT", id.getVersion(), id.getType()));
        env.addToBundleClassPath(bundleClassPath);
        env.setBundleActivator(null);
        env.addDynamicImportPackage("*");

        OSGiMetaDataBuilder osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext, new DummyExportPackagesSelector());
        try {
            osgiMetaDataBuilder.build(env);
        } catch (IllegalConfigurationException e) {
            throw new DeploymentException(e);
        }
        Manifest manifest;
        try {
View Full Code Here

Examples of org.apache.geronimo.deployment.util.osgi.OSGiMetaDataBuilder

            environment.addImportPackage(getImportPackageName(ConfigurationActivator.class.getName()));
        }
        List<GBeanData> gbeans = new ArrayList<GBeanData>(configuration.getGBeans().values());
        Collections.sort(gbeans, new GBeanData.PriorityComparator());

        OSGiMetaDataBuilder osgiMetaDataBuilder = null;
        //TODO Import package calculation is only used for deployed applications, should be use the same way for car package later
        if (System.getProperty("geronimo.build.car") == null) {
            osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext);
            //Hack Codes Here For RAR module, will remove while the connector refactoring is done
            if (configuration.getModuleType() == ConfigurationModuleType.RAR) {
                environment.addDynamicImportPackage("*");
            }
        } else {
            LinkedHashSet<String> imports = getImports(gbeans);
            addImport(imports, environment.getBundleActivator());
            environment.addImportPackages(imports);
            environment.addDynamicImportPackage("*");
            osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext, new DummyExportPackagesSelector());
        }

        try {
            osgiMetaDataBuilder.build(environment, configuration.getModuleType() == ConfigurationModuleType.CAR);
        } catch (IllegalConfigurationException e) {
            throw new DeploymentException(e);
        }

        if (tempBundle != null) {
View Full Code Here

Examples of org.apache.geronimo.deployment.util.osgi.OSGiMetaDataBuilder

        env.setConfigId(new Artifact(id.getGroupId(), id.getArtifactId() + "-DEPLOYMENT", id.getVersion(), id.getType()));
        env.addToBundleClassPath(bundleClassPath);
        env.setBundleActivator(null);
        env.addDynamicImportPackage("*");

        OSGiMetaDataBuilder osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext, new DummyExportPackagesSelector());
        try {
            osgiMetaDataBuilder.build(env);
        } catch (IllegalConfigurationException e) {
            throw new DeploymentException(e);
        }
        Manifest manifest;
        try {
View Full Code Here

Examples of org.apache.geronimo.deployment.util.osgi.OSGiMetaDataBuilder

            environment.addImportPackage(getImportPackageName(ConfigurationActivator.class.getName()));
        }
        List<GBeanData> gbeans = new ArrayList<GBeanData>(configuration.getGBeans().values());
        Collections.sort(gbeans, new GBeanData.PriorityComparator());

        OSGiMetaDataBuilder osgiMetaDataBuilder = null;
        //TODO Import package calculation is only used for deployed applications, should be use the same way for car package later
        if (System.getProperty("geronimo.build.car") == null) {
            osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext);
            //Hack Codes Here For RAR module, will remove while the connector refactoring is done
            if (configuration.getModuleType() == ConfigurationModuleType.RAR) {
                environment.addDynamicImportPackage("*");
            }
        } else {
            LinkedHashSet<String> imports = getImports(gbeans);
            addImport(imports, environment.getBundleActivator());
            environment.addImportPackages(imports);
            if (environment.getDynamicImportPackages().isEmpty()) {
                environment.addDynamicImportPackage("*");
            }
            osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext, new DummyExportPackagesSelector());
        }

        try {
            osgiMetaDataBuilder.build(environment, configuration.getModuleType() == ConfigurationModuleType.CAR);
        } catch (IllegalConfigurationException e) {
            throw new DeploymentException(e);
        }

        if (tempBundle != null) {
View Full Code Here

Examples of org.apache.geronimo.deployment.util.osgi.OSGiMetaDataBuilder

        env.setConfigId(new Artifact(id.getGroupId(), id.getArtifactId() + "-DEPLOYMENT", id.getVersion(), id.getType()));
        env.addToBundleClassPath(bundleClassPath);
        env.setBundleActivator(null);
        env.addDynamicImportPackage("*");

        OSGiMetaDataBuilder osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext, new DummyExportPackagesSelector());
        try {
            osgiMetaDataBuilder.build(env);
        } catch (IllegalConfigurationException e) {
            throw new DeploymentException(e);
        }
        Manifest manifest;
        try {
View Full Code Here

Examples of org.apache.geronimo.deployment.util.osgi.OSGiMetaDataBuilder

            environment.addImportPackage(getImportPackageName(ConfigurationActivator.class.getName()));
        }
        List<GBeanData> gbeans = new ArrayList<GBeanData>(configuration.getGBeans().values());
        Collections.sort(gbeans, new GBeanData.PriorityComparator());

        OSGiMetaDataBuilder osgiMetaDataBuilder = null;
        //TODO Import package calculation is only used for deployed applications, should be use the same way for car package later
        if (System.getProperty("geronimo.build.car") == null) {
            osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext);
            //Hack Codes Here For RAR module, will remove while the connector refactoring is done
            if (configuration.getModuleType() == ConfigurationModuleType.RAR) {
                environment.addDynamicImportPackage("*");
            }
        } else {
            LinkedHashSet<String> imports = getImports(gbeans);
            addImport(imports, environment.getBundleActivator());
            environment.addImportPackages(imports);
            environment.addDynamicImportPackage("*");
            osgiMetaDataBuilder = new OSGiMetaDataBuilder(bundleContext, new DummyExportPackagesSelector());
        }

        try {
            osgiMetaDataBuilder.build(environment, configuration.getModuleType() == ConfigurationModuleType.CAR);
        } catch (IllegalConfigurationException e) {
            throw new DeploymentException(e);
        }

        if (tempBundle != null) {
View Full Code Here

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
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.