Examples of PutResult


Examples of aQute.bnd.service.RepositoryPlugin.PutResult

        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);
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

        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);
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

    //
    // Check that we can actually put a resource
    //

    PutResult put = indexedRepo.put(IO.getFile("jar/osgi.jar").toURI().toURL().openStream(), null);
    assertNotNull(put);

    // Can we get it?

    ResourceDescriptor desc = indexedRepo.getDescriptor("osgi", new Version("4.0"));
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

      byte[] srcSha = calculateHash(sha1, srcBundle);

      PutOptions options = new RepositoryPlugin.PutOptions();
      options.digest = srcSha;

      PutResult r = testRepo.put(new BufferedInputStream(new FileInputStream(srcBundle)), options);

      dstBundle = new File(r.artifact);

      assertEquals(hashToString(srcSha), hashToString(r.digest));
      assertTrue(MessageDigest.isEqual(srcSha, r.digest));
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

  public void testDownloadListenerCallback() throws Exception {
    try {
      FileRepo repo = new FileRepo("tmp", tmp, true);
      File srcBundle = IO.getFile("testresources/test.jar");

      PutResult r = repo.put(IO.stream(IO.getFile("testresources/test.jar")), null);

      assertNotNull(r);
      assertNotNull(r.artifact);
      File f = new File(r.artifact); // file repo, so should match
      SHA1 sha1 = SHA1.digest(srcBundle);
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

          v.verify();
          bnd.getInfo(v);
        }

        if (bnd.isOk()) {
          PutResult r = writable.put(new BufferedInputStream(new FileInputStream(file)),
              new RepositoryPlugin.PutOptions());
          bnd.trace("put %s in %s (%s) into %s", source, writable.getName(), writable.getLocation(), r.artifact);
        }
      }
      finally {
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

 
  public static void testOverwrite() throws Exception {
    config.put("overwrite", "false");
    repo.setProperties(config);
   
    PutResult r = repo.put(new BufferedInputStream(new FileInputStream("testdata/bundles/name.njbartlett.osgi.emf.minimal-2.6.1.jar")), new RepositoryPlugin.PutOptions());
    File originalFile = new File(r.artifact);
    assertEquals(IO.getFile("generated/testoutput/name.njbartlett.osgi.emf.minimal/name.njbartlett.osgi.emf.minimal-2.6.1.jar")
        .getAbsolutePath(), originalFile.getAbsolutePath());
   
    Jar newJar = new Jar(IO.getFile("testdata/bundles/name.njbartlett.osgi.emf.minimal-2.6.1.jar"));
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

    assertNotNull(list);
    assertEquals(0, list.size());
  }

  public static void testDeployBundle() throws Exception {
    PutResult r = repo.put(new BufferedInputStream(new FileInputStream("testdata/bundles/name.njbartlett.osgi.emf.minimal-2.6.1.jar")), new RepositoryPlugin.PutOptions());
    File deployedFile = new File(r.artifact);

    assertEquals(
        IO.getFile(
            "generated/testoutput/name.njbartlett.osgi.emf.minimal/name.njbartlett.osgi.emf.minimal-2.6.1.jar")
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

        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);
View Full Code Here

Examples of aQute.bnd.service.RepositoryPlugin.PutResult

    assertNotNull(list);
    assertEquals(0, list.size());
  }

  public static void testDeployBundle() throws Exception {
    PutResult r = repo.put(new BufferedInputStream(new FileInputStream("testdata/bundles/name.njbartlett.osgi.emf.minimal-2.6.1.jar")), new RepositoryPlugin.PutOptions());
    File deployedFile = new File(r.artifact);

    assertEquals(IO.getFile("generated/testoutput/name.njbartlett.osgi.emf.minimal/name.njbartlett.osgi.emf.minimal-2.6.1.jar")
      .getAbsolutePath(), deployedFile.getAbsolutePath());
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.