本文整理汇总了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() );
}
}
}
示例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" );
}
}
示例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());
}
示例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);
}
示例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() );
}
}
示例6: artifactDeployed
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDeployed(RepositoryEvent event) {
logger.info("Deployed " + event.getArtifact() + " to " + event.getRepository());
}
示例7: artifactDeploying
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDeploying(RepositoryEvent event) {
logger.info("Deploying " + event.getArtifact() + " to " + event.getRepository());
}
示例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());
}
示例9: artifactDescriptorMissing
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDescriptorMissing(RepositoryEvent event) {
logger.info("Missing artifact descriptor for " + event.getArtifact());
}
示例10: artifactInstalled
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactInstalled(RepositoryEvent event) {
logger.info("Installed " + event.getArtifact() + " to " + event.getFile());
}
示例11: artifactInstalling
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactInstalling(RepositoryEvent event) {
logger.info("Installing " + event.getArtifact() + " to " + event.getFile());
}
示例12: artifactResolved
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactResolved(RepositoryEvent event) {
logger.info("Resolved artifact " + event.getArtifact() + " from " + event.getRepository());
}
示例13: artifactDownloading
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDownloading(RepositoryEvent event) {
logger.info("Downloading artifact " + event.getArtifact() + " from " + event.getRepository());
}
示例14: artifactDownloaded
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactDownloaded(RepositoryEvent event) {
logger.info("Downloaded artifact " + event.getArtifact() + " from " + event.getRepository());
}
示例15: artifactResolving
import org.sonatype.aether.RepositoryEvent; //导入依赖的package包/类
@Override
public void artifactResolving(RepositoryEvent event) {
logger.info("Resolving artifact " + event.getArtifact());
}