当前位置: 首页>>代码示例>>Java>>正文


Java RepositoryEvent类代码示例

本文整理汇总了Java中org.sonatype.aether.RepositoryEvent的典型用法代码示例。如果您正苦于以下问题:Java RepositoryEvent类的具体用法?Java RepositoryEvent怎么用?Java RepositoryEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RepositoryEvent类属于org.sonatype.aether包,在下文中一共展示了RepositoryEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: metadataResolved

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void metadataResolved( RepositoryEvent event )
{
    Exception e = event.getException();
    if ( e != null )
    {
        if ( e instanceof MetadataNotFoundException )
        {
            logger.debug( e.getMessage() );
        }
        else if ( logger.isDebugEnabled() )
        {
            logger.warn( e.getMessage(), e );
        }
        else
        {
            logger.warn( e.getMessage() );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:21,代码来源:LoggingRepositoryListener.java

示例2: artifactDescriptorInvalid

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDescriptorInvalid( RepositoryEvent event )
{
    StringBuilder buffer = new StringBuilder( 256 );
    buffer.append( "The POM for " );
    buffer.append( event.getArtifact() );
    buffer.append( " is invalid, transitive dependencies (if any) will not be available" );

    if ( logger.isDebugEnabled() )
    {
        logger.warn( buffer + ": " + event.getException().getMessage() );
    }
    else
    {
        logger.warn( buffer + ", enable debug logging for more details" );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:18,代码来源:LoggingRepositoryListener.java

示例3: artifactDownloading

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @param event {@inheritDoc}
 */
@Override
public void artifactDownloading(RepositoryEvent event) {
  super.artifactDownloading(event);
  Artifact artifact = event.getArtifact();
  String key = artifactAsString(artifact);
  startTimes.put(key, System.nanoTime());
}
 
开发者ID:zulily,项目名称:dropship,代码行数:12,代码来源:LoggingRepositoryListener.java

示例4: artifactDownloaded

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @param event {@inheritDoc}
 */
@Override
public void artifactDownloaded(RepositoryEvent event) {
  super.artifactDownloaded(event);
  Artifact artifact = event.getArtifact();
  String key = artifactAsString(artifact);
  long downloadTimeNanos = System.nanoTime() - startTimes.remove(key);
  double downloadTimeMs = TimeUnit.NANOSECONDS.toMillis(downloadTimeNanos);
  long size = artifact.getFile().length();
  double sizeKb = (1D / 1024D) * size;
  double downloadRateKBytesPerMs = sizeKb / downloadTimeMs;
  logger.info("Downloaded %s (%d bytes) in %gms (%g KBytes/sec)", key, size, downloadTimeMs, downloadRateKBytesPerMs * 1000);
}
 
开发者ID:zulily,项目名称:dropship,代码行数:17,代码来源:LoggingRepositoryListener.java

示例5: metadataInvalid

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void metadataInvalid( RepositoryEvent event )
{
    Exception exception = event.getException();

    StringBuilder buffer = new StringBuilder( 256 );
    buffer.append( "The metadata " );
    if ( event.getMetadata().getFile() != null )
    {
        buffer.append( event.getMetadata().getFile() );
    }
    else
    {
        buffer.append( event.getMetadata() );
    }

    if ( exception instanceof FileNotFoundException )
    {
        buffer.append( " is inaccessible" );
    }
    else
    {
        buffer.append( " is invalid" );
    }

    if ( exception != null )
    {
        buffer.append( ": " );
        buffer.append( exception.getMessage() );
    }

    if ( logger.isDebugEnabled() )
    {
        logger.warn( buffer.toString(), exception );
    }
    else
    {
        logger.warn( buffer.toString() );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:41,代码来源:LoggingRepositoryListener.java

示例6: artifactDeployed

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDeployed(RepositoryEvent event) {
  logger.info("Deployed " + event.getArtifact() + " to " + event.getRepository());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例7: artifactDeploying

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDeploying(RepositoryEvent event) {
  logger.info("Deploying " + event.getArtifact() + " to " + event.getRepository());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例8: artifactDescriptorInvalid

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDescriptorInvalid(RepositoryEvent event) {
  logger.info("Invalid artifact descriptor for " + event.getArtifact() + ": "
                                                 + event.getException().getMessage());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:6,代码来源:RepositoryListener.java

示例9: artifactDescriptorMissing

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDescriptorMissing(RepositoryEvent event) {
  logger.info("Missing artifact descriptor for " + event.getArtifact());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例10: artifactInstalled

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactInstalled(RepositoryEvent event) {
  logger.info("Installed " + event.getArtifact() + " to " + event.getFile());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例11: artifactInstalling

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactInstalling(RepositoryEvent event) {
  logger.info("Installing " + event.getArtifact() + " to " + event.getFile());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例12: artifactResolved

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactResolved(RepositoryEvent event) {
  logger.info("Resolved artifact " + event.getArtifact() + " from " + event.getRepository());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例13: artifactDownloading

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDownloading(RepositoryEvent event) {
  logger.info("Downloading artifact " + event.getArtifact() + " from " + event.getRepository());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例14: artifactDownloaded

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDownloaded(RepositoryEvent event) {
  logger.info("Downloaded artifact " + event.getArtifact() + " from " + event.getRepository());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java

示例15: artifactResolving

import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactResolving(RepositoryEvent event) {
  logger.info("Resolving artifact " + event.getArtifact());
}
 
开发者ID:lorthos,项目名称:incubator-zeppelin-druid,代码行数:5,代码来源:RepositoryListener.java


注:本文中的org.sonatype.aether.RepositoryEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。