use of org.eclipse.tycho.core.p2.P2ArtifactRepositoryLayout in project tycho by eclipse.
the class P2DependencyResolver method addEntireP2RepositoryToTargetPlatform.
private void addEntireP2RepositoryToTargetPlatform(ArtifactRepository repository, TargetPlatformConfigurationStub resolutionContext) {
try {
if (repository.getLayout() instanceof P2ArtifactRepositoryLayout) {
URI url = new URL(repository.getUrl()).toURI();
resolutionContext.addP2Repository(new MavenRepositoryLocation(repository.getId(), url));
getLogger().debug("Added p2 repository " + repository.getId() + " (" + repository.getUrl() + ")");
}
} catch (MalformedURLException e) {
throw new RuntimeException("Invalid repository URL: " + repository.getUrl(), e);
} catch (URISyntaxException e) {
throw new RuntimeException("Invalid repository URL: " + repository.getUrl(), e);
}
}
use of org.eclipse.tycho.core.p2.P2ArtifactRepositoryLayout in project tycho by eclipse.
the class TychoMirrorSelectorTest method createArtifactRepository.
private ArtifactRepository createArtifactRepository(String id, String url) {
ArtifactRepository repository = new MavenArtifactRepository();
repository.setId(id);
repository.setUrl(url);
repository.setLayout(new P2ArtifactRepositoryLayout());
return repository;
}
Aggregations