public void install(String coords, Path artifact) throws ProvisioningException { try { final Path path = getArtifactPath(coords); Files.createDirectories(path.getParent()); if(Files.isDirectory(artifact)) { ZipUtils.zip(artifact, path); }else { Files.copy(artifact, path, StandardCopyOption.REPLACE_EXISTING); } } catch (IOException ex) { throw new ProvisioningException("Failed to install artifact " + coords + " to " + artifact, ex); } }
ZipUtils.zip(tmpDir, pluginsDir.resolve(pluginFileName)); if(!plugins.isEmpty()) { for(Path plugin : plugins) {
IoUtils.recursiveDelete(zippedFP); ZipUtils.zip(versionDir, zippedFP); final Artifact artifact = new DefaultArtifact( groupDir.getFileName().toString(),
IoUtils.recursiveDelete(zippedFP); ZipUtils.zip(versionDir, zippedFP); final Artifact artifact = new DefaultArtifact( groupDir.getFileName().toString(),
void install(FeaturePackLocation.FPID fpid, Path fpContentDir) throws ProvisioningException { Universe<?> universe = null; UniverseFeaturePackInstaller ufpInstaller = null; if (universeResolution) { universe = universeResolver.getUniverse(fpid.getLocation().getUniverse()); ufpInstaller = ufpInstallers.get(universe.getFactoryId()); if (ufpInstaller == null) { throw new ProvisioningException(Errors.featurePackInstallerNotFound(universe.getFactoryId(), ufpInstallers.keySet())); } } final Path fpZip = getBuildDir().resolve(LayoutUtils.ensureValidFileName(fpid.toString())); try { ZipUtils.zip(fpContentDir, fpZip); } catch (IOException e) { throw new ProvisioningException("Failed to create feature-pack archive", e); } if (ufpInstaller != null) { ufpInstaller.install(universe, fpid, fpZip); } }