@Override public InputStream retrieve( String name ) throws IOException, FileNotFoundException { try { log.info( "index update retrieve file, name:{}", name ); Path file = tempIndexDirectory.resolve( name ); Files.deleteIfExists( file ); file.toFile( ).deleteOnExit( ); wagon.get( addParameters( name, remoteRepository ), file.toFile( ) ); return Files.newInputStream( file ); } catch ( AuthorizationException | TransferFailedException e ) { throw new IOException( e.getMessage( ), e ); } catch ( ResourceDoesNotExistException e ) { FileNotFoundException fnfe = new FileNotFoundException( e.getMessage( ) ); fnfe.initCause( e ); throw fnfe; } }
@Override public InputStream retrieve( String name ) throws IOException, FileNotFoundException { try { log.info( "index update retrieve file, name:{}", name ); Path file = tempIndexDirectory.resolve( name ); Files.deleteIfExists( file ); file.toFile().deleteOnExit(); wagon.get( addParameters( name, this.remoteRepository ), file.toFile() ); return Files.newInputStream( file ); } catch ( AuthorizationException | TransferFailedException e ) { throw new IOException( e.getMessage(), e ); } catch ( ResourceDoesNotExistException e ) { FileNotFoundException fnfe = new FileNotFoundException( e.getMessage() ); fnfe.initCause( e ); throw fnfe; } }
String msg = "Transfer for " + name + " failed"; logError( msg, e ); IOException ioException = new IOException( msg + "; " + e.getMessage() ); ioException.initCause( e ); throw ioException;
String msg = "Transfer for " + name + " failed"; logError( msg, e ); IOException ioException = new IOException( msg + "; " + e.getMessage() ); ioException.initCause( e ); throw ioException;
IOException ioException = new IOException( msg + "; " + e.getMessage() ); ioException.initCause( e ); throw ioException;
"Download failure on resource [" + remoteRepository.getURL() + "/" + remotePath + "]:" + e.getMessage(); if ( e.getCause() != null )
"Download failure on resource [" + remoteRepository.getURL() + "/" + remotePath + "]:" + e.getMessage(); if ( e.getCause() != null )
log.warn( "Could not connect to {}: {}", remoteRepository.getRepository().getName(), e.getMessage() ); connected = false;
log.warn( "Could not connect to {}: {}", remoteRepository.getRepository().getName(), e.getMessage() ); connected = false;
new Object[] { file.getURL(), e.getMessage() } ) );
log.error( "Could not connect to {}:{} ", remoteRepository.getName(), e.getMessage() ); connected = false;
log.error( "Could not connect to {}:{} ", remoteRepository.getName(), e.getMessage() ); connected = false;