Profile processProfile = getProcessProfile(requirements, true);
Profile deployProcessProfile = getProcessProfile(requirements, false);
Map<String, String> configuration = ProcessUtils.getProcessLayout(fabricService, processProfile, requirements.getLayout());
//DownloadManager downloadManager = DownloadManagers.createDownloadManager(fabricService, executorService);
InstallTask applyConfiguration = new ApplyConfigurationTask(configuration, installOptions.getProperties());
List<Profile> profiles = new ArrayList<Profile>();
profiles.add(deployProcessProfile);
Map<String, File> javaArtifacts = JavaContainers.getJavaContainerArtifactsFiles(fabricService, profiles, executorService);
String versionId = Profiles.versionId(fabricService.getCurrentContainer().getVersion());
List<String> profileIds = Profiles.profileIds(profiles);
Map<String, String> contextPathConfiguration = Profiles.getOverlayConfiguration(fabricService, profileIds, versionId, Constants.WEB_CONTEXT_PATHS_PID);
InstallTask applyProfile = new InstallDeploymentsTask(javaArtifacts, contextPathConfiguration);
InstallTask compositeTask = new CompositeTask(applyConfiguration, applyProfile);
Installation installation = processManager.install(installOptions, compositeTask);
if (installation != null) {
installation.getController().start();
}
return installation;