本文整理汇总了Java中org.apache.maven.wagon.events.TransferListener类的典型用法代码示例。如果您正苦于以下问题:Java TransferListener类的具体用法?Java TransferListener怎么用?Java TransferListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TransferListener类属于org.apache.maven.wagon.events包,在下文中一共展示了TransferListener类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createFetcher
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
private WagonHelper.WagonFetcher createFetcher(final Wagon wagon, TransferListener listener, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo) {
if(isDiag()) {
return new WagonHelper.WagonFetcher(wagon, listener, authenticationInfo, proxyInfo) {
@Override
public InputStream retrieve(String name) throws IOException, FileNotFoundException {
String id = wagon.getRepository().getId();
if(name.contains("properties") && System.getProperty("maven.diag.index.properties." + id) != null) { // NOI18N
LOGGER.log(Level.INFO, "maven indexer will use local properties file: {0}", System.getProperty("maven.diag.index.properties." + id)); // NOI18N
return new FileInputStream(new File(System.getProperty("maven.diag.index.properties." + id))); // NOI18N
} else if(name.contains(".gz") && System.getProperty("maven.diag.index.gz." + id) != null) { // NOI18N
LOGGER.log(Level.INFO, "maven indexer will use gz file: {0}", System.getProperty("maven.diag.index.gz." + id)); // NOI18N
return new FileInputStream(new File(System.getProperty("maven.diag.index.gz." + id))); // NOI18N
}
return super.retrieve(name);
}
};
} else {
return new WagonHelper.WagonFetcher(wagon, listener, authenticationInfo, proxyInfo);
}
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:NexusRepositoryIndexerImpl.java
示例2: buildWithDependencies
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
public MavenProject buildWithDependencies( File pom, ArtifactRepository localRepository,
ProfileManager profileManager, TransferListener transferListener )
throws ProjectBuildingException, ArtifactResolutionException, ArtifactNotFoundException
{
ProjectBuilderConfiguration configuration = new DefaultProjectBuilderConfiguration();
configuration.setLocalRepository( localRepository );
configuration.setGlobalProfileManager( profileManager );
ProjectBuildingRequest request = injectSession( toRequest( configuration ) );
request.setResolveDependencies( true );
try
{
return projectBuilder.build( pom, request ).getProject();
}
catch ( ProjectBuildingException e )
{
throw transformError( e );
}
}
开发者ID:gems-uff,项目名称:oceano,代码行数:22,代码来源:DefaultMavenProjectBuilder.java
示例3: fireTransferInitiated
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void fireTransferInitiated(Resource resource, int requestType) {
TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_INITIATED, requestType);
for (TransferListener transferListener : this.transferListeners) {
transferListener.transferInitiated(event);
}
}
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:8,代码来源:StandardTransferListenerSupport.java
示例4: fireTransferStarted
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void fireTransferStarted(Resource resource, int requestType) {
TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_STARTED, requestType);
for (TransferListener transferListener : this.transferListeners) {
transferListener.transferStarted(event);
}
}
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:8,代码来源:StandardTransferListenerSupport.java
示例5: fireTransferProgress
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void fireTransferProgress(Resource resource, int requestType, byte[] buffer, int length) {
TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_PROGRESS, requestType);
for (TransferListener transferListener : this.transferListeners) {
transferListener.transferProgress(event, buffer, length);
}
}
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:8,代码来源:StandardTransferListenerSupport.java
示例6: fireTransferCompleted
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void fireTransferCompleted(Resource resource, int requestType) {
TransferEvent event = new TransferEvent(this.wagon, resource, TransferEvent.TRANSFER_COMPLETED, requestType);
for (TransferListener transferListener : this.transferListeners) {
transferListener.transferCompleted(event);
}
}
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:8,代码来源:StandardTransferListenerSupport.java
示例7: fireTransferError
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void fireTransferError(Resource resource, int requestType, Exception exception) {
TransferEvent event = new TransferEvent(this.wagon, resource, exception, requestType);
for (TransferListener transferListener : this.transferListeners) {
transferListener.transferError(event);
}
}
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:8,代码来源:StandardTransferListenerSupport.java
示例8: Maven3ServerIndexFetcher
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
public Maven3ServerIndexFetcher(String originalRepositoryId,
String originalRepositoryUrl,
WagonManager wagonManager,
RepositorySystem repositorySystem,
TransferListener listener) {
myOriginalRepositoryId = originalRepositoryId;
myOriginalRepositoryUrl = originalRepositoryUrl;
myWagonManager = wagonManager;
myRepositorySystem = repositorySystem;
myListener = listener;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:Maven3ServerIndexFetcher.java
示例9: Maven2ServerIndexFetcher
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
public Maven2ServerIndexFetcher(String originalRepositoryId,
String originalRepositoryUrl,
WagonManager wagonManager,
TransferListener listener) {
myOriginalRepositoryId = originalRepositoryId;
myOriginalRepositoryUrl = originalRepositoryUrl;
myWagonManager = wagonManager;
myListener = listener;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:Maven2ServerIndexFetcher.java
示例10: resolve
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
public void resolve(
Artifact artifact,
List<ArtifactRepository> remoteRepositories,
ArtifactRepository localRepository,
TransferListener resolutionListener)
throws ArtifactResolutionException, ArtifactNotFoundException {
resolve(artifact, remoteRepositories, getSession(localRepository));
}
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:CheArtifactResolver.java
示例11: newAdapter
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
public static TransferListener newAdapter( ArtifactTransferListener listener )
{
if ( listener == null )
{
return null;
}
else
{
return new TransferListenerAdapter( listener );
}
}
开发者ID:gems-uff,项目名称:oceano,代码行数:12,代码来源:TransferListenerAdapter.java
示例12: testUnnecessaryRepositoryLookup
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
public void testUnnecessaryRepositoryLookup()
throws Exception
{
Artifact artifact = createTestPomArtifact( "target/test-data/get-missing-pom" );
List<ArtifactRepository> repos = new ArrayList<ArtifactRepository>();
repos.add( artifactRepositoryFactory.createArtifactRepository( "repo1", "string://url1",
new ArtifactRepositoryLayoutStub(), null, null ) );
repos.add( artifactRepositoryFactory.createArtifactRepository( "repo2", "string://url2",
new ArtifactRepositoryLayoutStub(), null, null ) );
StringWagon wagon = (StringWagon) wagonManager.getWagon( "string" );
wagon.addExpectedContent( repos.get( 0 ).getLayout().pathOf( artifact ), "expected" );
wagon.addExpectedContent( repos.get( 1 ).getLayout().pathOf( artifact ), "expected" );
class TransferListener
extends AbstractTransferListener
{
public List<TransferEvent> events = new ArrayList<TransferEvent>();
@Override
public void transferInitiated( TransferEvent transferEvent )
{
events.add( transferEvent );
}
}
TransferListener listener = new TransferListener();
wagonManager.getArtifact( artifact, repos, listener, false );
assertEquals( 1, listener.events.size() );
}
开发者ID:gems-uff,项目名称:oceano,代码行数:32,代码来源:DefaultWagonManagerTest.java
示例13: addTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
public void addTransferListener( TransferListener listener )
{
if ( listener instanceof TestTransferListener )
{
testTransferListener = (TestTransferListener) listener;
}
super.addTransferListener( listener );
}
开发者ID:gems-uff,项目名称:oceano,代码行数:9,代码来源:TestFileWagon.java
示例14: addTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void addTransferListener( TransferListener listener )
{
delegate.addTransferListener( listener );
}
开发者ID:ruikom,项目名称:apache-archiva,代码行数:6,代码来源:WagonDelegate.java
示例15: removeTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void removeTransferListener( TransferListener listener )
{
delegate.removeTransferListener( listener );
}
开发者ID:ruikom,项目名称:apache-archiva,代码行数:6,代码来源:WagonDelegate.java
示例16: hasTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public boolean hasTransferListener( TransferListener listener )
{
return delegate.hasTransferListener( listener );
}
开发者ID:ruikom,项目名称:apache-archiva,代码行数:6,代码来源:WagonDelegate.java
示例17: addTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void addTransferListener( TransferListener transferListener )
{
}
开发者ID:ruikom,项目名称:apache-archiva,代码行数:6,代码来源:MockWagon.java
示例18: removeTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void removeTransferListener( TransferListener transferListener )
{
}
开发者ID:ruikom,项目名称:apache-archiva,代码行数:6,代码来源:MockWagon.java
示例19: hasTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public boolean hasTransferListener( TransferListener transferListener )
{
return false;
}
开发者ID:ruikom,项目名称:apache-archiva,代码行数:6,代码来源:MockWagon.java
示例20: addTransferListener
import org.apache.maven.wagon.events.TransferListener; //导入依赖的package包/类
@Override
public void addTransferListener(TransferListener transferListener) {
if (transferListener != null) {
this.transferListeners.add(transferListener);
}
}
开发者ID:lambadaframework,项目名称:lambadaframework,代码行数:7,代码来源:StandardTransferListenerSupport.java
注:本文中的org.apache.maven.wagon.events.TransferListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论