use of aQute.bnd.deployer.repository.FixedIndexedRepo in project bnd by bndtools.
the class ResolveProcessTest method getIndex.
protected FixedIndexedRepo getIndex(String location) throws MalformedURLException, URISyntaxException {
File index = IO.getFile(location);
FixedIndexedRepo fir = new FixedIndexedRepo();
fir.setLocations(index.toURI().toString());
return fir;
}
use of aQute.bnd.deployer.repository.FixedIndexedRepo in project bnd by bndtools.
the class IndexedReposWithComms method testIndexedRepo.
/*
* Uses workspaces/indexed Sets up a FixedIndexedRepo to the local server.
*/
public void testIndexedRepo() throws IOException, Exception {
try (HttpTestServer ht = http()) {
createSecureSocks5();
Workspace ws = Workspace.getWorkspace(aQute.lib.io.IO.getFile("workspaces/indexed"));
assertNotNull(ws);
ws.setProperty("repo", ht.getBaseURI().toASCIIString() + "/index");
FixedIndexedRepo plugin = ws.getPlugin(FixedIndexedRepo.class);
assertTrue(ws.check());
assertNotNull(plugin);
List<String> list = plugin.list(null);
assertTrue(ws.check());
assertTrue(list.size() > 0);
}
}
use of aQute.bnd.deployer.repository.FixedIndexedRepo in project bnd by bndtools.
the class IndexedReposWithComms method testIndexedRepoWithPassword.
/*
* Uses workspaces/indexed Sets up a FixedIndexedRepo to the local server.
*/
public void testIndexedRepoWithPassword() throws IOException, Exception {
try (HttpTestServer ht = https()) {
createSecureSocks5();
Workspace ws = Workspace.getWorkspace(aQute.lib.io.IO.getFile("workspaces/indexed"));
assertNotNull(ws);
ws.setProperty("-connection-settings", "${build}/settings-withpassword.xml");
ws.setProperty("repo", ht.getBaseURI().toASCIIString() + "/index-auth/user/good");
FixedIndexedRepo plugin = ws.getPlugin(FixedIndexedRepo.class);
assertTrue(ws.check());
assertNotNull(plugin);
List<String> list = plugin.list(null);
assertTrue(ws.check());
assertTrue(list.size() > 0);
}
}
use of aQute.bnd.deployer.repository.FixedIndexedRepo in project bnd by bndtools.
the class ResourceTest method getResources.
private Set<Resource> getResources(String locations) throws MalformedURLException, URISyntaxException {
FixedIndexedRepo repo = new FixedIndexedRepo();
repo.setLocations(locations);
Requirement wildcard = ResourceUtils.createWildcardRequirement();
Collection<Capability> caps = repo.findProviders(Collections.singleton(wildcard)).get(wildcard);
return ResourceUtils.getResources(caps);
}
use of aQute.bnd.deployer.repository.FixedIndexedRepo in project bnd by bndtools.
the class ResolverValidator method getRepository.
FixedIndexedRepo getRepository() throws MalformedURLException, URISyntaxException {
FixedIndexedRepo repository = new FixedIndexedRepo();
repository.setLocations(Strings.join(repositories));
return repository;
}
Aggregations