Examples of ProfileDownloader


Examples of io.fabric8.agent.download.ProfileDownloader

            } else {
                executorService = Executors.newSingleThreadExecutor();
            }
        }

        ProfileDownloader downloader = new ProfileDownloader(fabricService, target, force, executorService);
        downloader.setStopOnFailure(stopOnFailure);
        // we do not want to download the files from within the profile itself, only the dependencies
        downloader.setDownloadFilesFromProfile(false);
        if (verbose) {
            downloader.setListener(new ProgressIndicator());
        }
        if (profile != null) {
            Profile profileObject = null;
            if (ver.hasProfile(profile)) {
                profileObject = ver.getRequiredProfile(profile);
            }
            if (profileObject == null) {
                System.out.println("Source profile " + profile + " not found.");
                return null;
            }
            downloader.downloadProfile(profileObject);
        } else {
            downloader.downloadVersion(ver);
        }
        List<String> failedProfileIDs = downloader.getFailedProfileIDs();
        System.out.println("Downloaded " + downloader.getProcessedFileCount() + " file(s) to " + target);
        if (failedProfileIDs.size() > 0) {
            System.out.println("Failed to download these profiles: " + failedProfileIDs + ". Check the logs for details");
        }
        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.