use of org.apache.archiva.repository.maven2.MavenRemoteRepository in project archiva by apache.
the class AbstractRepositoryLayerTestCase method createRemoteRepository.
protected MavenRemoteRepository createRemoteRepository(String id, String name, String url) throws URISyntaxException {
MavenRemoteRepository repo = new MavenRemoteRepository(id, name, Paths.get("target/remotes"));
repo.setLocation(new URI(url));
return repo;
}
use of org.apache.archiva.repository.maven2.MavenRemoteRepository in project archiva by apache.
the class MavenIndexManagerTest method createTestContextForRemote.
private ArchivaIndexingContext createTestContextForRemote() throws URISyntaxException, IndexCreationFailedException, IOException {
indexPath = Paths.get("target/repositories/test-repo/.index-test");
Path repoPath = Paths.get("target/repositories").toAbsolutePath();
repositoryRemote = new MavenRemoteRepository("test-repo", "Test Repo", repoPath);
repositoryRemote.setLocation(repoPath.resolve("test-repo").toUri());
RemoteIndexFeature icf = repositoryRemote.getFeature(RemoteIndexFeature.class).get();
icf.setIndexUri(new URI(".index-test"));
ctx = mavenIndexManager.createContext(repositoryRemote);
return ctx;
}
use of org.apache.archiva.repository.maven2.MavenRemoteRepository in project archiva by apache.
the class AbstractRepositoryLayerTestCase method createRemoteRepositoryContent.
protected RemoteRepositoryContent createRemoteRepositoryContent(String id, String name, String url, String layout) throws Exception {
MavenRemoteRepository repo = new MavenRemoteRepository(id, name, Paths.get("target/remotes"));
repo.setLocation(new URI(url));
repo.setLayout(layout);
RepositoryContentProvider provider = applicationContext.getBean("repositoryContentProvider#maven", RepositoryContentProvider.class);
RemoteRepositoryContent repoContent = provider.createRemoteContent(repo);
return repoContent;
}
Aggregations