@Test public void testResolve() throws URISyntaxException { File basedir = new File(getClass().getClassLoader().getResource("foo").getPath()).getParentFile(); File home = new File(basedir, "test-karaf-home"); File system = new File(home, "system"); SimpleMavenResolver resolver = new SimpleMavenResolver(Collections.singletonList(system)); resolver.resolve(new URI(ARTIFACT_COORDS)); }
public URI resolve(URI artifactUri) { for (File bundleDir : mavenRepos) { File file = findFile(bundleDir, artifactUri); if (file != null) { return file.toURI(); } } throw new RuntimeException("Could not resolve " + artifactUri); }
SimpleMavenResolver implements ArtifactResolver { public URI resolve(URI artifactUri) { for (File bundleDir : mavenRepos) { File file = findFile(bundleDir, artifactUri); if (file != null) { return file.toURI(); } } throw new RuntimeException("Could not resolve " + artifactUri); } }
SimpleMavenResolver implements ArtifactResolver { public URI resolve(URI artifactUri) { for (File bundleDir : mavenRepos) { File file = findFile(bundleDir, artifactUri); if (file != null) { return file.toURI(); } } throw new RuntimeException("Could not resolve " + artifactUri); } SimpleMavenResolver(List<File> mavenRepos); }
SimpleMavenResolver implements ArtifactResolver { public URI resolve(URI artifactUri) { for (File bundleDir : mavenRepos) { File file = findFile(bundleDir, artifactUri); if (file != null) { return file.toURI(); } } throw new RuntimeException("Could not resolve " + artifactUri); } SimpleMavenResolver(List<File> mavenRepos); URI resolve(URI artifactUri); }
SimpleMavenResolver implements ArtifactResolver { public URI resolve(URI artifactUri) { for (File bundleDir : mavenRepos) { File file = findFile(bundleDir, artifactUri); if (file != null) { return file.toURI(); } } throw new RuntimeException("Could not resolve " + artifactUri); } SimpleMavenResolver(List<File> mavenRepos); URI resolve(URI artifactUri);  }