private void patchDir(final Path fpDir, final Path patchDir) throws ProvisioningException { try { IoUtils.copy(patchDir, fpDir); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(patchDir, fpDir), e); } }
private void copyResources(Path fpDir) throws ProvisioningException { // resources should be copied last overriding the dependency resources final Path fpResources = fpDir.resolve(Constants.RESOURCES); if(Files.exists(fpResources)) { resourcesDir = getWorkDir().resolve(Constants.RESOURCES); try { IoUtils.copy(fpResources, resourcesDir); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(fpResources, resourcesDir), e); } } final Path fpPlugins = fpDir.resolve(Constants.PLUGINS); if(Files.exists(fpPlugins)) { if(pluginsDir == null) { pluginsDir = getWorkDir().resolve(Constants.PLUGINS); } try { IoUtils.copy(fpPlugins, pluginsDir); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(fpPlugins, pluginsDir), e); } } }
IoUtils.copy(installedConfig, stateDir.resolve(Constants.PROVISIONING_XML)); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(installedConfig, stateDir.resolve(Constants.PROVISIONING_XML)), e);
public static void replaceDist(Path stagedDir, Path home, boolean asUndo, Map<String, Boolean> undoTasks, MessageWriter log) throws ProvisioningException { log.verbose("Moving the provisioned installation from the staged directory to %s", home); // copy from the staged to the target installation directory if (Files.exists(home)) { if(asUndo) { StateHistoryUtils.removeLastUndoConfig(home, stagedDir, log); } else { StateHistoryUtils.addNewUndoConfig(home, stagedDir, undoTasks, log); } IoUtils.recursiveDelete(home); } try { IoUtils.copy(stagedDir, home); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(stagedDir, home)); } } }
IoUtils.copy(homePath, stagedPath); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(homePath, stagedPath), e);
IoUtils.copy(added.getPath(), target); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(added.getPath(), target), e);
IoUtils.copy(update.getPath(), target); } catch (IOException e) { throw new ProvisioningException(Errors.copyFile(update.getPath(), target), e);