public class RemoteFileManager extends Object
| Constructor and Description |
|---|
RemoteFileManager(org.apache.maven.artifact.manager.WagonManager wm,
org.apache.maven.settings.Settings settings,
org.apache.maven.plugin.logging.Log log)
initialize main information.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(String id,
String url)
connect the current object to repository given in constructor.
|
void |
disconnect()
disconnect the current object.
|
File |
get(String url,
String suffix)
get a file from the current repository connected.
|
static org.apache.maven.wagon.proxy.ProxyInfo |
getProxyInfo(org.apache.maven.settings.Settings settings)
Convenience method to map a Proxy object from the user system settings to a ProxyInfo object.
|
boolean |
isLockedFile(String fileName)
this method indicates if the targeted file is locked or not.
|
void |
lockFile(String fileName,
boolean ignoreLock) |
void |
put(File file,
String url)
put a file on the current repository connected.
|
String |
toString() |
void |
unlockFile(String fileName) |
public RemoteFileManager(org.apache.maven.artifact.manager.WagonManager wm,
org.apache.maven.settings.Settings settings,
org.apache.maven.plugin.logging.Log log)
wm - WagonManager provides by mavensettings - settings of the current project provides by mavenlog - loggerpublic void disconnect()
public void connect(String id, String url) throws org.apache.maven.plugin.MojoExecutionException
id - repository idurl - repository urlorg.apache.maven.plugin.MojoExecutionExceptionpublic File get(String url, String suffix) throws org.apache.maven.plugin.MojoExecutionException
url - url to the targeted filesuffix - suggested file suffixorg.apache.maven.plugin.MojoExecutionExceptionpublic void put(File file, String url) throws org.apache.maven.plugin.MojoExecutionException
file - file to uploadurl - url to copy fileorg.apache.maven.plugin.MojoExecutionExceptionpublic static org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo(org.apache.maven.settings.Settings settings)
settings - project settings given by mavenpublic void lockFile(String fileName, boolean ignoreLock) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic void unlockFile(String fileName) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic boolean isLockedFile(String fileName) throws org.apache.maven.plugin.MojoExecutionException
fileName - name targetedorg.apache.maven.plugin.MojoExecutionExceptionCopyright © 2006–2018 The Apache Software Foundation. All rights reserved.