{
List<RemoteRepository> remoteRepositories = new ArrayList<RemoteRepository>(
getArchivaConfiguration().getConfiguration().getRemoteRepositories().size() );
for ( RemoteRepositoryConfiguration repositoryConfiguration : getArchivaConfiguration().getConfiguration().getRemoteRepositories() )
{
RemoteRepository remoteRepository =
new RemoteRepository( repositoryConfiguration.getId(), repositoryConfiguration.getName(),
repositoryConfiguration.getUrl(), repositoryConfiguration.getLayout(),
repositoryConfiguration.getUsername(), repositoryConfiguration.getPassword(),
repositoryConfiguration.getTimeout() );
remoteRepository.setDownloadRemoteIndex( repositoryConfiguration.isDownloadRemoteIndex() );
remoteRepository.setRemoteIndexUrl( repositoryConfiguration.getRemoteIndexUrl() );
remoteRepository.setCronExpression( repositoryConfiguration.getRefreshCronExpression() );
remoteRepository.setIndexDirectory( repositoryConfiguration.getIndexDir() );
remoteRepository.setRemoteDownloadNetworkProxyId(
repositoryConfiguration.getRemoteDownloadNetworkProxyId() );
remoteRepository.setRemoteDownloadTimeout( repositoryConfiguration.getRemoteDownloadTimeout() );
remoteRepository.setDownloadRemoteIndexOnStartup(
repositoryConfiguration.isDownloadRemoteIndexOnStartup() );
remoteRepository.setDescription( repositoryConfiguration.getDescription() );
remoteRepositories.add( remoteRepository );
}
return remoteRepositories;
}