org.apache.maven.wagon.providers.ssh.jsch

Class ScpWagon

Implemented Interfaces:
CommandExecutor, SshWagon, Wagon

public class ScpWagon
extends AbstractJschWagon

A base class for deployers and fetchers using protocols from SSH2 family and JSch library for underlying implementation

This is responsible for authentification stage of the process.

We will first try to use public keys for authentication and if that doesn't work then we fall back to using the login and password

Version:
$Id: ScpWagon.java 477374 2006-11-20 22:34:46Z brett $

Field Summary

Fields inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon

EXEC_CHANNEL, session

Fields inherited from class org.apache.maven.wagon.providers.ssh.AbstractSshWagon

DEFAULT_SSH_PORT, PATH_SEPARATOR, interactiveUserInfo, knownHostsProvider

Fields inherited from class org.apache.maven.wagon.AbstractWagon

DEFAULT_BUFFER_SIZE, authenticationInfo, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupport

Fields inherited from interface org.apache.maven.wagon.CommandExecutor

ROLE

Fields inherited from interface org.apache.maven.wagon.Wagon

ROLE

Method Summary

void
get(String resourceName, File destination)
Downloads specified resource from the repository to given file.
void
get(String basedir, Resource resource, File destination)
void
put(File source, String destination)
Copy a file from local system to remote
void
put(File source, String basedir, Resource resource, String octalMode)
protected String
readLine(InputStream in)
protected static void
sendEom(OutputStream out)

Methods inherited from class org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon

closeConnection, executeCommand, openConnection

Methods inherited from class org.apache.maven.wagon.providers.ssh.AbstractSshWagon

executeCommand, getDirectoryMode, getFileList, getIfNewer, getInteractiveUserInfo, getKnownHostsProvider, getOctalMode, getOctalMode, getPort, getPrivateKey, getResource, getResourceDirectory, getResourceFilename, handleGetException, openConnection, putDirectory, resourceExists, setInteractiveUserInfo, setKnownHostsProvider, supportsDirectoryCopy

Methods inherited from class org.apache.maven.wagon.AbstractWagon

addSessionListener, addTransferListener, closeConnection, connect, connect, connect, connect, createParentDirectories, createZip, disconnect, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getFileList, getPath, getProxyInfo, getRepository, getSessionEventSupport, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, postProcessListeners, putDirectory, putTransfer, removeSessionListener, removeTransferListener, resourceExists, setInteractive, setSessionEventSupport, setTransferEventSupport, supportsDirectoryCopy, transfer, transfer, transfer

Method Details

get

public void get(String resourceName,
                File destination)
            throws TransferFailedException,
                   ResourceDoesNotExistException,
                   AuthorizationException
Downloads specified resource from the repository to given file.
Specified by:
get in interface Wagon
Parameters:
resourceName -
destination -

get

public void get(String basedir,
                Resource resource,
                File destination)
            throws ResourceDoesNotExistException,
                   TransferFailedException

put

public void put(File source,
                String destination)
            throws TransferFailedException,
                   ResourceDoesNotExistException,
                   AuthorizationException
Copy a file from local system to remote
Specified by:
put in interface Wagon
Parameters:
source - the local file
destination - the remote destination

put

public void put(File source,
                String basedir,
                Resource resource,
                String octalMode)
            throws TransferFailedException

readLine

protected String readLine(InputStream in)
            throws IOException

sendEom

protected static void sendEom(OutputStream out)
            throws IOException