Examples of FabBundleInfo


Examples of io.fabric8.fab.osgi.FabBundleInfo

                public void downloaded(File file, int pendings) throws Exception {
                    if (listener != null) {
                        listener.onDownload(file, pendings);
                    }
                    FabResolver resolver = fabResolverFactory.getResolver(file.toURI().toURL());
                    FabBundleInfo fabInfo = resolver.getInfo();

                    ResourceImpl resource = (ResourceImpl) manageResource(location, fabInfo.getManifest(), new StreamProvider.Fab(fabInfo));
                    for (String name : fabInfo.getFeatures()) {
                        registerMatchingFeatures(name);
                        requireFeature(name, resource);
                    }
                    for (DependencyTree dep : fabInfo.getBundles()) {
                        File depFile = dep.getJarFile();
                        Attributes attrs = getAttributes(dep.getJarURL().toString(), depFile);
                        if (attrs.getValue(Constants.BUNDLE_SYMBOLICNAME) != null) {
                            manageResource(getMvnUrl(dep), attrs, new StreamProvider.File(depFile));
                        }
View Full Code Here

Examples of io.fabric8.fab.osgi.FabBundleInfo

     */
    @Override
    public InputStream getInputStream() throws IOException {
        connect();
        try {
            FabBundleInfo info = resolver.getInfo();

            HashSet<String> actualImports = new HashSet<String>();
            actualImports.addAll(info.getImports());

            InputStream rc = info.getInputStream();

            installMissingFeatures(info);
            if (configuration.isInstallMissingDependencies()) {
                installMissingDependencies(info, actualImports);
            } else {
View Full Code Here

Examples of io.fabric8.fab.osgi.FabBundleInfo

                    throw new IOException(
                            "Instructions file must contain a property named " + ServiceConstants.INSTR_FAB_URL
                    );
                }

                FabBundleInfo info = new FabBundleInfoImpl(classPathResolver, fabUri, instructions, getConfiguration(), embeddedResources, resolvePomDetails());
                return info;
            } catch (IOException e) {
                throw e;
            } catch (Exception e) {
                throw new IOException(e.getMessage(), e);
View Full Code Here

Examples of io.fabric8.fab.osgi.FabBundleInfo

        return bundle;
    }

    protected FabBundleInfo getFabBundleInfo(String url) {
        try {
            FabBundleInfo info = getFabResolverFactory().getResolver(new URL(url)).getInfo();
            info.getInputStream();
            return info;
        } catch (Exception e) {
            System.err.println("Unable to retrieve FAB info for " + url + ". Reason: " + e);
        }
        return null;
View Full Code Here

Examples of io.fabric8.fab.osgi.FabBundleInfo

    @Override
    protected Object doExecute() throws Exception {
        FabResolver resolver = getFabResolver(fab);
        if (fab != null) {
            FabBundleInfo info = resolver.getInfo();

            PrintStream console = System.out;
            console.printf("URL: %s%n", info.getUrl());
            printEmbedded(console, getClassPathElements(info.getManifest().getValue(Constants.BUNDLE_CLASSPATH)));
            printBundles(console, info.getBundles());
            printFeatures(console, info.getFeatures());
            printFeatureURLs(console, info.getFeatureURLs());
            console.printf("%nFor more information about this FAB:%n");
            console.printf("  use 'fab:headers %s' to view the OSGi headers%n", fab);
            console.printf("  use 'fab:tree %s' to view a tree representation of the dependencies%n", fab);
        }
        return null;
View Full Code Here

Examples of io.fabric8.fab.osgi.FabBundleInfo

                    String key = enumeration.nextElement();
                    attributes.put(key, headers.get(key));
                }
            }
        } else {
            FabBundleInfo info = getFabBundleInfo(fab);
            if (info != null) {
                attributes = info.getManifest();
            }
        }

        println(generateFormattedOutput(attributes));
        return null;
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.