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

Class ScpExternalWagon

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

UNKNOWN: [BP] add compression flag

Field Summary
StringscpArgs
Arguments to pass to the SCP command.
StringscpExecutable
The external SCP command to use - default is scp.
StringsshArgs
Arguments to pass to the SSH command.
StringsshExecutable
The external SSH command to use - default is ssh.
static intSSH_FATAL_EXIT_CODE
Method Summary
voidcloseConnection()
CommandlinecreateBaseCommandLine(boolean putty, String executable)
StreamsexecuteCommand(String command, boolean ignoreFailures)
voidexecuteCommand(String command)
voidexecuteScpCommand(File localFile, String remoteFile, boolean put)
voidget(String resourceName, File destination)
StringgetScpArgs()
StringgetScpExecutable()
StringgetSshArgs()
StringgetSshExecutable()
voidopenConnection()
voidput(File source, String destination)
voidputDirectory(File sourceDirectory, String destinationDirectory)
voidsetScpArgs(String scpArgs)
voidsetScpExecutable(String scpExecutable)
voidsetSshArgs(String sshArgs)
voidsetSshExecutable(String sshExecutable)

Field Detail

scpArgs

private String scpArgs
Arguments to pass to the SCP command.

UNKNOWN:

scpExecutable

private String scpExecutable
The external SCP command to use - default is scp.

UNKNOWN: default="scp"

sshArgs

private String sshArgs
Arguments to pass to the SSH command.

UNKNOWN:

sshExecutable

private String sshExecutable
The external SSH command to use - default is ssh.

UNKNOWN: default="ssh"

SSH_FATAL_EXIT_CODE

private static final int SSH_FATAL_EXIT_CODE

Method Detail

closeConnection

public void closeConnection()

createBaseCommandLine

private Commandline createBaseCommandLine(boolean putty, String executable)

executeCommand

public Streams executeCommand(String command, boolean ignoreFailures)

executeCommand

public void executeCommand(String command)

executeScpCommand

private void executeScpCommand(File localFile, String remoteFile, boolean put)

get

public void get(String resourceName, File destination)

getScpArgs

public String getScpArgs()

getScpExecutable

public String getScpExecutable()

getSshArgs

public String getSshArgs()

getSshExecutable

public String getSshExecutable()

openConnection

public void openConnection()

put

public void put(File source, String destination)

putDirectory

public void putDirectory(File sourceDirectory, String destinationDirectory)

setScpArgs

public void setScpArgs(String scpArgs)

setScpExecutable

public void setScpExecutable(String scpExecutable)

setSshArgs

public void setSshArgs(String sshArgs)

setSshExecutable

public void setSshExecutable(String sshExecutable)