public void artifactDescriptorInvalid(RepositoryEvent event) {
   out.println(
       "Invalid artifact descriptor for "
           + event.getArtifact()
           + ": "
           + event.getException().getMessage());
 }
 @Override
 public void artifactDownloading(RepositoryEvent event) {
   super.artifactDownloading(event);
   Artifact artifact = event.getArtifact();
   String key = artifactAsString(artifact);
   startTimes.put(key, System.nanoTime());
 }
Ejemplo n.º 3
0
  private void checkEvents(String msg, Artifact artifact, boolean failed) {
    List<RepositoryEvent> events = listener.getEvents();
    assertEquals(msg, 2, events.size());
    RepositoryEvent event = events.get(0);
    assertEquals(msg, EventType.ARTIFACT_INSTALLING, event.getType());
    assertEquals(msg, artifact, event.getArtifact());
    assertNull(msg, event.getException());

    event = events.get(1);
    assertEquals(msg, EventType.ARTIFACT_INSTALLED, event.getType());
    assertEquals(msg, artifact, event.getArtifact());
    if (failed) {
      assertNotNull(msg + " > expected exception", event.getException());
    } else {
      assertNull(msg + " > " + event.getException(), event.getException());
    }
  }
Ejemplo n.º 4
0
  private void checkEvents(String msg, Metadata metadata, boolean failed) {
    List<RepositoryEvent> events = listener.getEvents();
    assertEquals(msg, 2, events.size());
    RepositoryEvent event = events.get(0);
    assertEquals(msg, EventType.METADATA_INSTALLING, event.getType());
    assertEquals(msg, metadata, event.getMetadata());
    assertNull(msg, event.getException());

    event = events.get(1);
    assertEquals(msg, EventType.METADATA_INSTALLED, event.getType());
    assertEquals(msg, metadata, event.getMetadata());
    if (failed) {
      assertNotNull(msg, event.getException());
    } else {
      assertNull(msg, event.getException());
    }
  }
 @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);
   double downloadTimeSec = TimeUnit.NANOSECONDS.toSeconds(downloadTimeNanos);
   long size = artifact.getFile().length();
   double sizeK = (1 / 1024D) * size;
   double downloadRateKBytesPerSecond = sizeK / downloadTimeSec;
   info(
       "Downloaded %s (%d bytes) in %gms (%g kbytes/sec).",
       key, size, downloadTimeMs, downloadRateKBytesPerSecond);
 }
 public void artifactDownloaded(RepositoryEvent event) {
   out.println("Downloaded artifact " + event.getArtifact() + " from " + event.getRepository());
 }
 public void artifactResolved(RepositoryEvent event) {
   out.println("Resolved artifact " + event.getArtifact() + " from " + event.getRepository());
 }
 public void artifactInstalling(RepositoryEvent event) {
   out.println("Installing " + event.getArtifact() + " to " + event.getFile());
 }
 public void artifactDescriptorMissing(RepositoryEvent event) {
   out.println("Missing artifact descriptor for " + event.getArtifact());
 }
Ejemplo n.º 10
0
 public void artifactInstalling(RepositoryEvent event) {
   log.debug("Installing " + event.getArtifact() + " to " + event.getFile());
 }
 public void metadataResolving(RepositoryEvent event) {
   out.println("Resolving metadata " + event.getMetadata() + " from " + event.getRepository());
 }
 public void metadataInstalling(RepositoryEvent event) {
   out.println("Installing " + event.getMetadata() + " to " + event.getFile());
 }
Ejemplo n.º 13
0
 public void metadataInvalid(RepositoryEvent event) {
   log.debug("Invalid metadata " + event.getMetadata());
 }
Ejemplo n.º 14
0
 public void metadataInstalling(RepositoryEvent event) {
   log.debug("Installing " + event.getMetadata() + " to " + event.getFile());
 }
Ejemplo n.º 15
0
 public void metadataDeploying(RepositoryEvent event) {
   log.debug("Deploying " + event.getMetadata() + " to " + event.getRepository());
 }
Ejemplo n.º 16
0
 public void artifactResolving(RepositoryEvent event) {
   log.debug("Resolving artifact " + event.getArtifact());
 }
Ejemplo n.º 17
0
 public void artifactDownloaded(RepositoryEvent event) {
   log.debug("Downloaded artifact " + event.getArtifact() + " from " + event.getRepository());
 }
Ejemplo n.º 18
0
 public void artifactResolved(RepositoryEvent event) {
   log.debug("Resolved artifact " + event.getArtifact() + " from " + event.getRepository());
 }
 public void artifactResolving(RepositoryEvent event) {
   out.println("Resolving artifact " + event.getArtifact());
 }
 public void metadataDeploying(RepositoryEvent event) {
   out.println("Deploying " + event.getMetadata() + " to " + event.getRepository());
 }
Ejemplo n.º 21
0
 public void artifactDescriptorInvalid(RepositoryEvent event) {
   log.debug(
       "Invalid artifact descriptor for " + event.getArtifact() + ": ", event.getException());
 }
 public void metadataInvalid(RepositoryEvent event) {
   out.println("Invalid metadata " + event.getMetadata());
 }
Ejemplo n.º 23
0
 public void artifactDeploying(RepositoryEvent event) {
   log.debug("Deploying " + event.getArtifact() + " to " + event.getRepository());
 }
Ejemplo n.º 24
0
 public void metadataResolving(RepositoryEvent event) {
   log.debug("Resolving metadata " + event.getMetadata() + " from " + event.getRepository());
 }
Ejemplo n.º 25
0
 public void artifactDescriptorMissing(RepositoryEvent event) {
   log.debug("Missing artifact descriptor for " + event.getArtifact());
 }
 @Override
 public void artifactResolved(RepositoryEvent event) {
   super.artifactResolved(event);
   debug("Resolved %s.", artifactAsString(event.getArtifact()));
 }
 public void artifactDeploying(RepositoryEvent event) {
   out.println("Deploying " + event.getArtifact() + " to " + event.getRepository());
 }