Search in sources :

Example 21 with DownloadManager

use of io.fabric8.agent.download.DownloadManager in project fabric8 by jboss-fuse.

the class JavaContainers method getJavaContainerArtifactsFiles.

public static Map<String, File> getJavaContainerArtifactsFiles(FabricService fabricService, List<Profile> profileList, DownloadManager downloadManager) throws Exception {
    Map<String, File> answer = new HashMap<String, File>();
    ProfileService profileService = fabricService.adapt(ProfileService.class);
    for (Profile profile : profileList) {
        Profile overlay = profileService.getOverlayProfile(profile);
        Map<String, Parser> profileArtifacts = AgentUtils.getProfileArtifacts(fabricService, downloadManager, overlay);
        appendMavenDependencies(profileArtifacts, profile);
        Set<String> rawUrls = profileArtifacts.keySet();
        downloadArtifactUrls(downloadManager, rawUrls, answer);
    }
    return answer;
}
Also used : ProfileService(io.fabric8.api.ProfileService) HashMap(java.util.HashMap) File(java.io.File) Profile(io.fabric8.api.Profile) Parser(io.fabric8.maven.util.Parser)

Aggregations

HashMap (java.util.HashMap)9 DownloadManager (io.fabric8.agent.download.DownloadManager)8 Profile (io.fabric8.api.Profile)8 File (java.io.File)8 Downloader (io.fabric8.agent.download.Downloader)6 DownloadCallback (io.fabric8.agent.download.DownloadCallback)5 StreamProvider (io.fabric8.agent.download.StreamProvider)5 Feature (io.fabric8.agent.model.Feature)5 ProfileService (io.fabric8.api.ProfileService)5 MavenResolver (io.fabric8.maven.MavenResolver)5 Map (java.util.Map)5 MultiException (io.fabric8.common.util.MultiException)4 Parser (io.fabric8.maven.util.Parser)4 IOException (java.io.IOException)4 Repository (io.fabric8.agent.model.Repository)3 FabricService (io.fabric8.api.FabricService)3 ArrayList (java.util.ArrayList)3 Hashtable (java.util.Hashtable)3 BundleInfo (io.fabric8.agent.model.BundleInfo)2 Agent (io.fabric8.agent.service.Agent)2