use of org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager in project tycho by eclipse.
the class RemoteAgent method addMavenAwareRepositoryManagers.
private static void addMavenAwareRepositoryManagers(AgentBuilder agent, MavenRepositorySettings mavenRepositorySettings, MavenLogger logger) {
// register service which stores mapping between URLs and IDs (used by Maven)
RemoteRepositoryLoadingHelper loadingHelper = new RemoteRepositoryLoadingHelper(mavenRepositorySettings, logger);
agent.registerService(IRepositoryIdManager.class, loadingHelper);
// wrap metadata repository manager
IMetadataRepositoryManager plainMetadataRepoManager = agent.getService(IMetadataRepositoryManager.class);
IMetadataRepositoryManager remoteMetadataRepoManager = new RemoteMetadataRepositoryManager(plainMetadataRepoManager, loadingHelper, logger);
agent.registerService(IMetadataRepositoryManager.class, remoteMetadataRepoManager);
// wrap artifact repository manager
IArtifactRepositoryManager plainArtifactRepoManager = agent.getService(IArtifactRepositoryManager.class);
RemoteArtifactRepositoryManager remoteArtifactRepoManager = new RemoteArtifactRepositoryManager(plainArtifactRepoManager, loadingHelper);
agent.registerService(IArtifactRepositoryManager.class, remoteArtifactRepoManager);
}
Aggregations