if ( connector.isDisabled() )
{
continue;
}
RemoteRepositoryContent targetRepository = connector.getTargetRepository();
requestProperties.setProperty( "remoteRepositoryId", targetRepository.getId() );
String targetPath = path;
try
{
File downloadedFile =
transferFile( connector, targetRepository, targetPath, repository, localFile, requestProperties,
false );
if ( fileExists( downloadedFile ) )
{
log.debug( "Successfully transferred: {}", downloadedFile.getAbsolutePath() );
return downloadedFile;
}
}
catch ( NotFoundException e )
{
log.debug( "Resource {} not found on repository \"{}\".", path,
targetRepository.getRepository().getId() );
}
catch ( NotModifiedException e )
{
log.debug( "Resource {} not updated on repository \"{}\".", path,
targetRepository.getRepository().getId() );
}
catch ( ProxyException e )
{
log.warn(
"Transfer error from repository {} for resource {}, continuing to next repository. Error message: {}",
targetRepository.getRepository().getId(), path, e.getMessage() );
log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ),
"Transfer error from repository \"" + targetRepository.getRepository().getId()
+ "\" for resource " + path + ", continuing to next repository. Error message: {}",
e.getMessage(), e );
}
catch ( RepositoryAdminException e )
{
log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ),
"Transfer error from repository {} for resource {}, continuing to next repository. Error message: {}",
targetRepository.getRepository().getId(), path, e.getMessage(), e );
log.debug( MarkerFactory.getDetachedMarker( "transfer.error" ), "Full stack trace", e );
}
}
log.debug( "Exhausted all target repositories, resource {} not found.", path );