Package org.osgi.service.indexer.impl

Examples of org.osgi.service.indexer.impl.RepoIndex.indexFragment()


    File tempDir = createTempDir();
    File tempFile = copyToTempFile(tempDir, "testdata/01-bsn+version.jar");

    Map<String, String> config = new HashMap<String, String>();
    config.put(ResourceIndexer.ROOT_URL, tempDir.getAbsoluteFile().toURI().toString());
    indexer.indexFragment(Collections.singleton(tempFile), writer, config);

    assertEquals(readStream(TestStandaloneLibrary.class.getResourceAsStream("/testdata/fragment-basic.txt")), writer.toString().trim());

    deleteWithException(tempDir);
  }
View Full Code Here


    File tempDir = createTempDir();
    File tempFile = copyToTempFile(tempDir, "testdata/org.eclipse.equinox.ds-1.4.0.jar");

    Map<String, String> config = new HashMap<String, String>();
    config.put(ResourceIndexer.ROOT_URL, tempDir.getAbsoluteFile().toURI().toString());
    indexer.indexFragment(Collections.singleton(tempFile), writer, config);

    assertEquals(readStream(TestStandaloneLibrary.class.getResourceAsStream("/testdata/org.eclipse.equinox.ds-1.4.0.fragment.txt")), writer.toString().trim());

    deleteWithException(tempDir);
  }
View Full Code Here

    File tempDir = createTempDir();
    File tempFile = copyToTempFile(tempDir, "testdata/org.eclipse.equinox.ds-1.4.0.jar");

    Map<String, String> config = new HashMap<String, String>();
    config.put(ResourceIndexer.ROOT_URL, tempDir.getAbsoluteFile().toURI().toString());
    indexer.indexFragment(Collections.singleton(tempFile), writer, config);

    assertEquals(readStream(TestStandaloneLibrary.class.getResourceAsStream("/testdata/org.eclipse.equinox.ds-1.4.0.extra-fragment.txt")), writer.toString().trim());

    deleteWithException(tempDir);
  }
View Full Code Here

    File tempDir = createTempDir();
    File tempFile = copyToTempFile(tempDir, "testdata/jcip-annotations.jar");

    Map<String, String> config = new HashMap<String, String>();
    config.put(ResourceIndexer.ROOT_URL, tempDir.getAbsoluteFile().toURI().toString());
    indexer.indexFragment(Collections.singleton(tempFile), writer, config);

    assertEquals(readStream(TestStandaloneLibrary.class.getResourceAsStream("/testdata/plainjar.fragment.txt")), writer.toString().trim());

    deleteWithException(tempDir);
  }
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.