Class RsyncExternalWagon
- java.lang.Object
-
- org.apache.maven.wagon.AbstractWagon
-
- org.apache.maven.wagon.providers.rsync.external.AbstractExternalWagon
-
- org.apache.maven.wagon.providers.rsync.external.RsyncExternalWagon
-
- All Implemented Interfaces:
ExternalWagon,RsyncWagon,WagonHasAuthenticationInfo,Wagon
public class RsyncExternalWagon extends AbstractExternalWagon implements RsyncWagon
RSYNC deployer using "external" rsync program. To allow for ssh-agent type behavior, until we can construct a Java SSH Agent and interface for JSch.- Author:
- Haolun Zhang
-
-
Field Summary
-
Fields inherited from class org.apache.maven.wagon.AbstractWagon
authenticationInfo, BUFFER_SEGMENT_SIZE, DEFAULT_BUFFER_SIZE, interactive, MAXIMUM_BUFFER_SIZE, MINIMUM_AMOUNT_OF_TRANSFER_CHUNKS, proxyInfo, repository, sessionEventSupport, transferEventSupport
-
Fields inherited from interface org.apache.maven.wagon.Wagon
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
-
-
Constructor Summary
Constructors Constructor Description RsyncExternalWagon()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildRemoteHost()The hostname of the remote server prefixed with the username, which comes either from the repository URL or from the authenticationInfo.CommandlinecreateBaseCommandLine(File privateKey, String... options)StringgetExecutable()List<String>getFileList(String destinationDirectory)booleanisInteractive()voidputDirectory(File sourceDirectory, String destinationDirectory)voidputMkdirRemote(String destination)voidputSetPermissionRemote(Resource resource, String destination)booleanresourceExists(String resourceName)voidsetInteractive(boolean interactive)-
Methods inherited from class org.apache.maven.wagon.providers.rsync.external.AbstractExternalWagon
closeConnection, executeCopyCommand, executeCopyCommand, fireSessionDebug, fireTransferDebug, get, getIfNewer, openConnectionInternal, put, supportsDirectoryCopy
-
Methods inherited from class org.apache.maven.wagon.AbstractWagon
addSessionListener, addTransferListener, cleanupGetTransfer, cleanupPutTransfer, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, finishGetTransfer, finishPutTransfer, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferError, fireTransferProgress, getAuthenticationInfo, getBufferCapacityForTransfer, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setPermissionsOverride, setReadTimeout, setSessionEventSupport, setTimeout, setTransferEventSupport, transfer, transfer, transfer, transfer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.maven.wagon.providers.rsync.external.ExternalWagon
executeCopyCommand, executeCopyCommand, supportsDirectoryCopy
-
Methods inherited from interface org.apache.maven.wagon.providers.rsync.external.RsyncWagon
createBaseCommandLine, createRemoteDirectory, getRsyncArgs, getRsyncExecutable
-
Methods inherited from interface org.apache.maven.wagon.Wagon
addSessionListener, addTransferListener, connect, connect, connect, connect, connect, connect, disconnect, get, getIfNewer, getReadTimeout, getRepository, getTimeout, hasSessionListener, hasTransferListener, openConnection, put, removeSessionListener, removeTransferListener, setReadTimeout, setTimeout
-
Methods inherited from interface org.apache.maven.wagon.providers.rsync.external.WagonHasAuthenticationInfo
getAuthenticationInfo
-
-
-
-
Method Detail
-
buildRemoteHost
public String buildRemoteHost()
Description copied from interface:WagonHasAuthenticationInfoThe hostname of the remote server prefixed with the username, which comes either from the repository URL or from the authenticationInfo.- Specified by:
buildRemoteHostin interfaceWagonHasAuthenticationInfo- Returns:
- remote host string
-
createBaseCommandLine
public Commandline createBaseCommandLine(File privateKey, String... options)
- Specified by:
createBaseCommandLinein classAbstractExternalWagon
-
getExecutable
public String getExecutable()
- Specified by:
getExecutablein interfaceExternalWagon
-
getFileList
public List<String> getFileList(String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException
- Specified by:
getFileListin interfaceWagon- Overrides:
getFileListin classAbstractWagon- Throws:
TransferFailedExceptionResourceDoesNotExistException
-
isInteractive
public boolean isInteractive()
- Specified by:
isInteractivein interfaceWagon- Overrides:
isInteractivein classAbstractWagon
-
putDirectory
public void putDirectory(File sourceDirectory, String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
- Specified by:
putDirectoryin interfaceRsyncWagon- Specified by:
putDirectoryin interfaceWagon- Overrides:
putDirectoryin classAbstractWagon- Throws:
TransferFailedExceptionResourceDoesNotExistExceptionAuthorizationException
-
putMkdirRemote
public void putMkdirRemote(String destination) throws AuthorizationException, ResourceDoesNotExistException, TransferFailedException
- Specified by:
putMkdirRemotein interfaceRsyncWagon- Specified by:
putMkdirRemotein classAbstractExternalWagon- Throws:
AuthorizationExceptionResourceDoesNotExistExceptionTransferFailedException
-
putSetPermissionRemote
public void putSetPermissionRemote(Resource resource, String destination) throws TransferFailedException
- Specified by:
putSetPermissionRemotein interfaceRsyncWagon- Specified by:
putSetPermissionRemotein classAbstractExternalWagon- Throws:
TransferFailedException
-
resourceExists
public boolean resourceExists(String resourceName) throws TransferFailedException
- Specified by:
resourceExistsin interfaceWagon- Overrides:
resourceExistsin classAbstractWagon- Throws:
TransferFailedException
-
setInteractive
public void setInteractive(boolean interactive)
- Specified by:
setInteractivein interfaceWagon- Overrides:
setInteractivein classAbstractWagon
-
-