rp.put(new BufferedInputStream(new FileInputStream(file)), new RepositoryPlugin.PutOptions()); return;
options = new PutOptions(); else { result.options = options;
options = new PutOptions(); else { result.options = options;
new RepositoryPlugin.PutOptions()); bnd.trace("put %s in %s (%s) into %s", source, writable.getName(), writable.getLocation(), r.artifact);
PutResult r = rp.put(jarStream, new RepositoryPlugin.PutOptions()); trace("Released %s to %s in repository %s", jarName, r.artifact, rp);
rp.put(new BufferedInputStream(new FileInputStream(file)), new RepositoryPlugin.PutOptions()); return;
rp.put(new BufferedInputStream(IO.stream(file)), new RepositoryPlugin.PutOptions()); return; } catch (Exception e) {
rp.put(new BufferedInputStream(new FileInputStream(file)), new RepositoryPlugin.PutOptions()); return;
rp.put(new BufferedInputStream(IO.stream(file)), new RepositoryPlugin.PutOptions()); return; } catch (Exception e) {
public void copy(RepositoryPlugin source, Instructions filter, RepositoryPlugin destination) throws Exception { assert source != null; assert destination != null; logger.info("copy from repo {} to {} with filter {}", source, destination, filter); for (String bsn : source.list(null)) { for (Version version : source.versions(bsn)) { if (filter == null || filter.matches(bsn)) { logger.info("copy {}:{}", bsn, version); File file = source.get(bsn, version, null); if (file.getName() .endsWith(".jar")) { try (InputStream in = IO.stream(file)) { PutOptions po = new PutOptions(); po.bsn = bsn; po.context = null; po.type = "bundle"; po.version = version; PutResult put = destination.put(in, po); } catch (Exception e) { logger.error("Failed to copy {}-{}", e, bsn, version); error("Failed to copy %s:%s from %s to %s, error: %s", bsn, version, source, destination, e); } } } } } }
public void copy(RepositoryPlugin source, Instructions filter, RepositoryPlugin destination) throws Exception { assert source != null; assert destination != null; logger.info("copy from repo {} to {} with filter {}", source, destination, filter); for (String bsn : source.list(null)) { for (Version version : source.versions(bsn)) { if (filter == null || filter.matches(bsn)) { logger.info("copy {}:{}", bsn, version); File file = source.get(bsn, version, null); if (file.getName() .endsWith(".jar")) { try (InputStream in = IO.stream(file)) { PutOptions po = new PutOptions(); po.bsn = bsn; po.context = null; po.type = "bundle"; po.version = version; PutResult put = destination.put(in, po); } catch (Exception e) { logger.error("Failed to copy {}-{}", e, bsn, version); error("Failed to copy %s:%s from %s to %s, error: %s", bsn, version, source, destination, e); } } } } } }
public URI releaseURI(String name, String jarName, InputStream jarStream) throws Exception { // Blank repository name means no release if ("".equals(name)) { return null; } trace("release to %s", name); RepositoryPlugin repo = getReleaseRepo(name); if (repo == null) { if (name == null) msgs.NoNameForReleaseRepository(); else msgs.ReleaseRepository_NotFoundIn_(name, getPlugins(RepositoryPlugin.class)); return null; } try { PutResult r = repo.put(jarStream, new RepositoryPlugin.PutOptions()); trace("Released %s to %s in repository %s", jarName, r.artifact, repo); return r.artifact; } catch (Exception e) { msgs.Release_Into_Exception_(jarName, repo, e); return null; } }
public URI releaseURI(String name, String jarName, InputStream jarStream) throws Exception { // Blank repository name means no release if ("".equals(name)) { return null; } trace("release to %s", name); RepositoryPlugin repo = getReleaseRepo(name); if (repo == null) { if (name == null) msgs.NoNameForReleaseRepository(); else msgs.ReleaseRepository_NotFoundIn_(name, getPlugins(RepositoryPlugin.class)); return null; } try { PutResult r = repo.put(jarStream, new RepositoryPlugin.PutOptions()); trace("Released %s to %s in repository %s", jarName, r.artifact, repo); return r.artifact; } catch (Exception e) { msgs.Release_Into_Exception_(jarName, repo, e); return null; } }
private URI releaseRepo(RepositoryPlugin releaseRepo, String jarName, InputStream jarStream) throws Exception { logger.debug("release to {}", releaseRepo.getName()); try { PutOptions putOptions = new RepositoryPlugin.PutOptions(); // TODO find sub bnd that is associated with this thing putOptions.context = this; PutResult r = releaseRepo.put(jarStream, putOptions); logger.debug("Released {} to {} in repository {}", jarName, r.artifact, releaseRepo); return r.artifact; } catch (Exception e) { msgs.Release_Into_Exception_(jarName, releaseRepo, e); return null; } }
private URI releaseRepo(RepositoryPlugin releaseRepo, String jarName, InputStream jarStream) throws Exception { logger.debug("release to {}", releaseRepo.getName()); try { PutOptions putOptions = new RepositoryPlugin.PutOptions(); // TODO find sub bnd that is associated with this thing putOptions.context = this; PutResult r = releaseRepo.put(jarStream, putOptions); logger.debug("Released {} to {} in repository {}", jarName, r.artifact, releaseRepo); return r.artifact; } catch (Exception e) { msgs.Release_Into_Exception_(jarName, releaseRepo, e); return null; } }
private void install(File f, RepositoryPlugin repo, Attrs value) throws Exception { try (Processor p = new Processor()) { p.getProperties() .putAll(value); PutOptions options = new PutOptions(); options.context = p; try (InputStream in = IO.stream(f)) { repo.put(in, options); } catch (Exception e) { exception(e, "Cannot install %s into %s because %s", f, repo.getName(), e); } } }
private void install(File f, RepositoryPlugin repo, Attrs value) throws Exception { try (Processor p = new Processor()) { p.getProperties() .putAll(value); PutOptions options = new PutOptions(); options.context = p; try (InputStream in = IO.stream(f)) { repo.put(in, options); } catch (Exception e) { exception(e, "Cannot install %s into %s because %s", f, repo.getName(), e); } } }