本文整理汇总了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;
}