}
protected ProxyRepository createProxyRepository()
throws Exception
{
final RepositoryTemplate template =
(RepositoryTemplate) getRepositoryTemplates().getTemplates(Maven2ContentClass.class,
RepositoryPolicy.RELEASE, MavenProxyRepository.class).pick();
final ConfigurableRepository templateConf = template.getConfigurableRepository();
templateConf.setId("test");
templateConf.setName("Test");
final CRemoteStorage remoteStorageConf = new CRemoteStorage();
remoteStorageConf.setUrl("http://localhost:" + server.getPort());
template.getCoreConfiguration().getConfiguration(true).setRemoteStorage(remoteStorageConf);
final MavenProxyRepository mavenProxyRepository = (MavenProxyRepository) template.create();
return mavenProxyRepository;
}