org.codehaus.mojo.versions.utils
Class WagonUtils

java.lang.Object
  extended by org.codehaus.mojo.versions.utils.WagonUtils

public final class WagonUtils
extends Object

Utility methods to help with using Wagons.

Since:
1.0-alpha-3
Author:
Stephen Connolly

Method Summary
static org.apache.maven.wagon.Wagon createWagon(String serverId, String url, org.apache.maven.artifact.manager.WagonManager wagonManager, org.apache.maven.settings.Settings settings, org.apache.maven.plugin.logging.Log logger)
          Convenience method to create a wagon.
static org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo(org.apache.maven.settings.Settings settings)
          Convenience method to convert the Proxy object from a Settings into a ProxyInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProxyInfo

public static org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo(org.apache.maven.settings.Settings settings)
Convenience method to convert the Proxy object from a Settings into a ProxyInfo.

Parameters:
settings - The settings to use.
Returns:
The proxy details from the settings or null if the settings do not define a proxy.

createWagon

public static org.apache.maven.wagon.Wagon createWagon(String serverId,
                                                       String url,
                                                       org.apache.maven.artifact.manager.WagonManager wagonManager,
                                                       org.apache.maven.settings.Settings settings,
                                                       org.apache.maven.plugin.logging.Log logger)
                                                throws org.apache.maven.wagon.UnsupportedProtocolException,
                                                       org.apache.maven.artifact.manager.WagonConfigurationException,
                                                       org.apache.maven.wagon.ConnectionException,
                                                       org.apache.maven.wagon.authentication.AuthenticationException
Convenience method to create a wagon.

Parameters:
serverId - The serverId to use if the wagonManager needs help.
url - The url to create a wagon for.
wagonManager - The wgaon manager to use.
settings - The settings to use.
logger - The logger to use.
Returns:
The wagon to connect to the url.
Throws:
org.apache.maven.wagon.UnsupportedProtocolException - if the protocol is not supported.
org.apache.maven.artifact.manager.WagonConfigurationException - if the wagon cannot be configured.
org.apache.maven.wagon.ConnectionException - If the connection cannot be established.
org.apache.maven.wagon.authentication.AuthenticationException - If the connection cannot be authenticated.


Copyright © 2008-2011 Codehaus. All Rights Reserved.