use of org.eclipse.equinox.p2.repository.artifact.IArtifactRepository in project tycho by eclipse.
the class P2MirrorDisablingArtifactRepositoryManager method createRepository.
// disable mirrors in returned repositories
@Override
public IArtifactRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
IArtifactRepository repository = delegate.createRepository(location, name, type, properties);
disableMirrors(repository, mavenLogger);
return repository;
}
use of org.eclipse.equinox.p2.repository.artifact.IArtifactRepository in project tycho by eclipse.
the class P2MirrorDisablingArtifactRepositoryManager method loadRepository.
@Override
public IArtifactRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
IArtifactRepository repository = delegate.loadRepository(location, flags, monitor);
disableMirrors(repository, mavenLogger);
return repository;
}
use of org.eclipse.equinox.p2.repository.artifact.IArtifactRepository in project tycho by eclipse.
the class P2MirrorDisablingArtifactRepositoryManager method refreshRepository.
@Override
public IArtifactRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
IArtifactRepository repository = delegate.refreshRepository(location, monitor);
disableMirrors(repository, mavenLogger);
return repository;
}
use of org.eclipse.equinox.p2.repository.artifact.IArtifactRepository in project tycho by eclipse.
the class RemoteAgentDisableP2MirrorsTest method testWithoutDisableP2Mirrors.
@Test
public void testWithoutDisableP2Mirrors() throws Exception {
IProvisioningAgent agent = createRemoteAgent(false);
IArtifactRepository repo = loadRepository(agent, ResourceUtil.resourceFile("p2-mirrors-disable").toURI());
assertThat(repo.getProperty(IRepository.PROP_MIRRORS_URL), is("file://dummy/"));
}
use of org.eclipse.equinox.p2.repository.artifact.IArtifactRepository in project tycho by eclipse.
the class RemoteAgentDisableP2MirrorsTest method testDisableP2Mirrors.
@Test
public void testDisableP2Mirrors() throws Exception {
IProvisioningAgent agent = createRemoteAgent(true);
IArtifactRepository repo = loadRepository(agent, ResourceUtil.resourceFile("p2-mirrors-disable").toURI());
assertThat(repo.getProperty(IRepository.PROP_MIRRORS_URL), is(nullValue()));
}
Aggregations