public class ScmWagon extends AbstractWagon
|
authenticationInfo, DEFAULT_BUFFER_SIZE, interactive, proxyInfo, repository, sessionEventSupport, transferEventSupport
DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_TIMEOUT, ROLE
Constructor and Description |
---|
ScmWagon() |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection() |
void |
get(String resourceName,
File destination)
Downloads specified resource from the repository to given file.
|
File |
getCheckoutDirectory()
Get the directory where Wagon will checkout files from SCM.
|
List<String> |
getFileList(String resourcePath)
Returns a
List of strings naming the files and directories in the directory denoted by
this abstract pathname. |
boolean |
getIfNewer(String resourceName,
File destination,
long timestamp)
Not implemented
|
org.apache.maven.scm.manager.ScmManager |
getScmManager()
Get the
ScmManager used in this Wagon |
org.apache.maven.scm.provider.ScmProvider |
getScmProvider(String scmType)
Convenience method to get the
ScmProvider implementation to handle the provided SCM type |
String |
getScmVersion()
Get the scmVersion used in this Wagon
|
String |
getScmVersionType()
Get the scmVersionType used in this Wagon
|
void |
openConnectionInternal()
This will cleanup the checkout directory
|
void |
put(File source,
String targetName)
Copy a file from local system to remote
|
void |
putDirectory(File sourceDirectory,
String destinationDirectory)
Copy a directory from local system to remote
|
boolean |
resourceExists(String resourceName)
Check if a remote resource exists
|
void |
setCheckoutDirectory(File checkoutDirectory)
Set the directory where Wagon will checkout files from SCM.
|
void |
setScmManager(org.apache.maven.scm.manager.ScmManager scmManager)
Set the
ScmManager used in this Wagon |
void |
setScmVersion(String scmVersion)
Set the scmVersion
|
void |
setScmVersionType(String scmVersionType)
Set the scmVersionType
|
boolean |
supportsDirectoryCopy()
Flag indicating if this wagon supports directory copy operations.
|
addSessionListener, addTransferListener, cleanupGetTransfer, cleanupPutTransfer, connect, connect, connect, connect, connect, connect, createParentDirectories, disconnect, finishGetTransfer, finishPutTransfer, fireGetCompleted, fireGetInitiated, fireGetStarted, firePutCompleted, firePutInitiated, firePutStarted, fireSessionConnectionRefused, fireSessionDebug, fireSessionDisconnected, fireSessionDisconnecting, fireSessionError, fireSessionLoggedIn, fireSessionLoggedOff, fireSessionOpened, fireSessionOpening, fireTransferDebug, fireTransferError, fireTransferProgress, getAuthenticationInfo, getPath, getPermissionsOverride, getProxyInfo, getProxyInfo, getReadTimeout, getRepository, getSessionEventSupport, getTimeout, getTransfer, getTransfer, getTransfer, getTransfer, getTransferEventSupport, hasSessionListener, hasTransferListener, isInteractive, openConnection, postProcessListeners, putTransfer, putTransfer, removeSessionListener, removeTransferListener, setInteractive, setPermissionsOverride, setReadTimeout, setSessionEventSupport, setTimeout, setTransferEventSupport, transfer, transfer, transfer
public ScmWagon()
public org.apache.maven.scm.manager.ScmManager getScmManager()
ScmManager
used in this WagonScmManager
public void setScmManager(org.apache.maven.scm.manager.ScmManager scmManager)
ScmManager
used in this WagonscmManager
- public String getScmVersion()
public void setScmVersion(String scmVersion)
scmVersion
- the scmVersion to setpublic String getScmVersionType()
public void setScmVersionType(String scmVersionType)
scmVersionType
- the scmVersionType to setpublic File getCheckoutDirectory()
public void setCheckoutDirectory(File checkoutDirectory)
checkoutDirectory
- public org.apache.maven.scm.provider.ScmProvider getScmProvider(String scmType) throws org.apache.maven.scm.manager.NoSuchScmProviderException
ScmProvider
implementation to handle the provided SCM typescmType
- type of SCM, eg. svn
, cvs
ScmProvider
that will handle provided SCM typeorg.apache.maven.scm.manager.NoSuchScmProviderException
- if there is no ScmProvider
able to handle that SCM typepublic void openConnectionInternal() throws ConnectionException
openConnectionInternal
in class AbstractWagon
ConnectionException
public void put(File source, String targetName) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagon
source
- the local filetargetName
- the remote destinationTransferFailedException
ResourceDoesNotExistException
AuthorizationException
public boolean supportsDirectoryCopy()
Wagon
supportsDirectoryCopy
in interface Wagon
supportsDirectoryCopy
in class AbstractWagon
public void putDirectory(File sourceDirectory, String destinationDirectory) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagon
putDirectory
in interface Wagon
putDirectory
in class AbstractWagon
sourceDirectory
- the local directorydestinationDirectory
- the remote destinationTransferFailedException
ResourceDoesNotExistException
AuthorizationException
public void closeConnection() throws ConnectionException
closeConnection
in class AbstractWagon
ConnectionException
public boolean getIfNewer(String resourceName, File destination, long timestamp) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
true
if newer resource has been downloaded, false
if resource
in the repository is older or has the same age.UnsupportedOperationException
- alwaysTransferFailedException
ResourceDoesNotExistException
AuthorizationException
public void get(String resourceName, File destination) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagon
public List<String> getFileList(String resourcePath) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
Wagon
List
of strings naming the files and directories in the directory denoted by
this abstract pathname.
If this abstract pathname does not denote a directory, or does not exist, then this method throws
ResourceDoesNotExistException
.
Otherwise a List
of strings is returned, one for each file or directory in the directory.
Names denoting the directory itself and the directory's parent directory are not included in
the result. Each string is a file name rather than a complete path.
There is no guarantee that the name strings in the resulting list will appear in any specific
order; they are not, in particular, guaranteed to appear in alphabetical order.
getFileList
in interface Wagon
getFileList
in class AbstractWagon
resourcePath
- directory to list contents ofTransferFailedException
- if there's an error trying to access the remote sideResourceDoesNotExistException
- if destinationDirectory does not exist or is not a directoryAuthorizationException
- if not authorized to list the contents of the directoryAbstractWagon.getFileList(java.lang.String)
public boolean resourceExists(String resourceName) throws TransferFailedException, AuthorizationException
Wagon
resourceExists
in interface Wagon
resourceExists
in class AbstractWagon
TransferFailedException
- if there's an error trying to access the remote sideAuthorizationException
- if not authorized to verify the existence of the resourceCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.