本文整理匯總了Java中org.apache.maven.artifact.manager.WagonConfigurationException類的典型用法代碼示例。如果您正苦於以下問題:Java WagonConfigurationException類的具體用法?Java WagonConfigurationException怎麽用?Java WagonConfigurationException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WagonConfigurationException類屬於org.apache.maven.artifact.manager包,在下文中一共展示了WagonConfigurationException類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createHelper
import org.apache.maven.artifact.manager.WagonConfigurationException; //導入依賴的package包/類
private DefaultVersionsHelper createHelper( String rulesUri, ArtifactMetadataSource metadataSource )
throws MojoExecutionException
{
final DefaultWagonManager wagonManager = new DefaultWagonManager()
{
public Wagon getWagon( Repository repository )
throws UnsupportedProtocolException, WagonConfigurationException
{
return new FileWagon();
}
};
DefaultVersionsHelper helper =
new DefaultVersionsHelper( new DefaultArtifactFactory(), new DefaultArtifactResolver(), metadataSource, new ArrayList(),
new ArrayList(),
new DefaultArtifactRepository( "", "", new DefaultRepositoryLayout() ),
wagonManager, new Settings(), "", rulesUri, mock( Log.class ), mock( MavenSession.class ),
new DefaultPathTranslator());
return helper;
}
示例2: createWagon
import org.apache.maven.artifact.manager.WagonConfigurationException; //導入依賴的package包/類
/**
* Convenience method to create a wagon.
*
* @param serverId The serverId to use if the wagonManager needs help.
* @param url The url to create a wagon for.
* @param wagonManager The wgaon manager to use.
* @param settings The settings to use.
* @param logger The logger to use.
* @return The wagon to connect to the url.
* @throws org.apache.maven.wagon.UnsupportedProtocolException
* if the protocol is not supported.
* @throws org.apache.maven.artifact.manager.WagonConfigurationException
* if the wagon cannot be configured.
* @throws org.apache.maven.wagon.ConnectionException
* If the connection cannot be established.
* @throws org.apache.maven.wagon.authentication.AuthenticationException
* If the connection cannot be authenticated.
*/
public static Wagon createWagon( String serverId, String url, WagonManager wagonManager, Settings settings,
Log logger )
throws UnsupportedProtocolException, WagonConfigurationException, ConnectionException, AuthenticationException
{
Repository repository = new Repository( serverId, url );
Wagon wagon = wagonManager.getWagon( repository );
if ( logger.isDebugEnabled() )
{
Debug debug = new Debug();
wagon.addSessionListener( debug );
wagon.addTransferListener( debug );
}
ProxyInfo proxyInfo = getProxyInfo( settings );
if ( proxyInfo != null )
{
wagon.connect( repository, wagonManager.getAuthenticationInfo( repository.getId() ), proxyInfo );
}
else
{
wagon.connect( repository, wagonManager.getAuthenticationInfo( repository.getId() ) );
}
return wagon;
}
示例3: createHelper
import org.apache.maven.artifact.manager.WagonConfigurationException; //導入依賴的package包/類
private VersionsHelper createHelper( String rulesUri, ArtifactMetadataSource metadataSource )
throws MojoExecutionException
{
final DefaultWagonManager wagonManager = new DefaultWagonManager()
{
public Wagon getWagon( Repository repository )
throws UnsupportedProtocolException, WagonConfigurationException
{
return new FileWagon();
}
};
VersionsHelper helper =
new DefaultVersionsHelper( new DefaultArtifactFactory(), new DefaultArtifactResolver(), metadataSource, new ArrayList(),
new ArrayList(),
new DefaultArtifactRepository( "", "", new DefaultRepositoryLayout() ),
wagonManager, new Settings(), "", rulesUri, mock( Log.class ), mock( MavenSession.class ),
new DefaultPathTranslator());
return helper;
}
開發者ID:petr-ujezdsky,項目名稱:versions-maven-plugin-svn-clone,代碼行數:21,代碼來源:DefaultVersionsHelperTest.java
示例4: createWagon
import org.apache.maven.artifact.manager.WagonConfigurationException; //導入依賴的package包/類
/**
* Convenience method to create a wagon.
*
* @param serverId The serverId to use if the wagonManager needs help.
* @param url The url to create a wagon for.
* @param wagonManager The wgaon manager to use.
* @param settings The settings to use.
* @param logger The logger to use.
* @return The wagon to connect to the url.
* @throws org.apache.maven.wagon.UnsupportedProtocolException if the protocol is not supported.
* @throws org.apache.maven.artifact.manager.WagonConfigurationException if the wagon cannot be configured.
* @throws org.apache.maven.wagon.ConnectionException If the connection cannot be established.
* @throws org.apache.maven.wagon.authentication.AuthenticationException If the connection cannot be authenticated.
*/
public static Wagon createWagon( String serverId, String url, WagonManager wagonManager, Settings settings,
Log logger )
throws UnsupportedProtocolException, WagonConfigurationException,
ConnectionException, AuthenticationException
{
Repository repository = new Repository( serverId, url );
Wagon wagon = wagonManager.getWagon( repository );
if ( logger.isDebugEnabled() )
{
Debug debug = new Debug();
wagon.addSessionListener( debug );
wagon.addTransferListener( debug );
}
ProxyInfo proxyInfo = getProxyInfo( settings );
if ( proxyInfo != null )
{
wagon.connect( repository, wagonManager.getAuthenticationInfo( repository.getId() ), proxyInfo );
}
else
{
wagon.connect( repository, wagonManager.getAuthenticationInfo( repository.getId() ) );
}
return wagon;
}