org.apache.maven.wagon.providers.ssh.external

Class ScpExternalWagon

Implemented Interfaces:
CommandExecutor, SshWagon, Wagon

public class ScpExternalWagon
extends AbstractSshWagon

SCP deployer using "external" scp program. To allow for ssh-agent type behavior, until we can construct a Java SSH Agent and interface for JSch.
Version:
$Id:ScpExternalWagon.java 477260 2006-11-20 17:11:39Z brett $
Author:
Brett Porter

Field Summary

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
closeConnection()
void
executeCommand(String command)
Streams
executeCommand(String command, boolean ignoreFailures)
void
get(String resourceName, File destination)
Downloads specified resource from the repository to given file.
String
getScpArgs()
String
getScpExecutable()
String
getSshArgs()
String
getSshExecutable()
void
openConnection()
void
put(File source, String destination)
Copy a file from local system to remote
void
putDirectory(File sourceDirectory, String destinationDirectory)
Copy a directory from local system to remote
void
setScpArgs(String scpArgs)
void
setScpExecutable(String scpExecutable)
void
setSshArgs(String sshArgs)
void
setSshExecutable(String sshExecutable)

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

closeConnection

public void closeConnection()
Overrides:
closeConnection in interface AbstractWagon

executeCommand

public void executeCommand(String command)
            throws CommandExecutionException
Specified by:
executeCommand in interface CommandExecutor
Overrides:
executeCommand in interface AbstractSshWagon

executeCommand

public Streams executeCommand(String command,
                              boolean ignoreFailures)
            throws CommandExecutionException
Specified by:
executeCommand in interface CommandExecutor

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 -

getScpArgs

public String getScpArgs()

getScpExecutable

public String getScpExecutable()

getSshArgs

public String getSshArgs()

getSshExecutable

public String getSshExecutable()

openConnection

public void openConnection()
            throws AuthenticationException
Specified by:
openConnection in interface Wagon
Overrides:
openConnection in interface AbstractSshWagon

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

putDirectory

public void putDirectory(File sourceDirectory,
                         String destinationDirectory)
            throws TransferFailedException,
                   ResourceDoesNotExistException,
                   AuthorizationException
Copy a directory from local system to remote
Specified by:
putDirectory in interface Wagon
Overrides:
putDirectory in interface AbstractSshWagon
Parameters:
sourceDirectory - the local directory
destinationDirectory - the remote destination

setScpArgs

public void setScpArgs(String scpArgs)

setScpExecutable

public void setScpExecutable(String scpExecutable)

setSshArgs

public void setSshArgs(String sshArgs)

setSshExecutable

public void setSshExecutable(String sshExecutable)