Package org.apache.geronimo.mavenplugins.osgi.utils

Examples of org.apache.geronimo.mavenplugins.osgi.utils.BundleResolver


       
        if (!target.exists()) {
            return;
        }
               
        BundleResolver stateController = new BundleResolver(getLogger());
               
        try {
            stateController.addBundle(target);
        } catch (BundleException e) {
            log.error(e.getMessage(), e);
        }       
        stateController.resolveState();
        BundleDescription b = stateController.getBundleDescription(target);               
        if (b != null) {
            displayManifest(b);
        }   
    }
View Full Code Here


       
        if (profileName != null) {
            System.setProperty("osgi.java.profile", profileName);
        }
       
        BundleResolver stateController = new BundleResolver(getLogger());
       
        List<String> classpath;
        try {
            classpath = (List<String>)project.getCompileClasspathElements();
        } catch (DependencyResolutionRequiredException e) {
            throw new MojoExecutionException(e.getMessage(), e);
        }
       
        for (String path : classpath) {
            try {
                File cp = new File(path);
                if (log.isDebugEnabled()) {
                    log.debug("Adding bundle: " + cp);
                }
                if (cp.exists()) {
                    stateController.addBundle(cp);
                }
            } catch (BundleException e) {
                log.error(e.getMessage(), e);
            }
        }
       
        stateController.resolveState();
        BundleDescription b = stateController.getBundleDescription(targetDir);               
        if (b != null) {
            log.info("Resolving OSGi bundle: " + b.getSymbolicName());
            try {
                stateController.assertResolved(b);
                log.info("OSGi bundle is resolved: " + b.getSymbolicName());
            } catch (BundleException e) {
                stateController.analyzeErrors(b);
                if (failOnError) {
                    throw new MojoExecutionException("OSGi bundle resolution failed");
                }
            }
        }   
View Full Code Here

       
        if (!target.exists()) {
            return;
        }
               
        BundleResolver stateController = new BundleResolver(getLogger());
               
        try {
            stateController.addBundle(target);
        } catch (BundleException e) {
            log.error(e.getMessage(), e);
        }       
        stateController.resolveState();
        BundleDescription b = stateController.getBundleDescription(target);               
        if (b != null) {
            displayManifest(b);
        }   
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.mavenplugins.osgi.utils.BundleResolver

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.