@Override
    public void artifactDiscovered(ArtifactContext ac) {
      try {
        if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException();
        if (scanned.incrementAndGet() % 100 == 0) {
          p.setText("Scanned " + scanned.get() + " artifacts...");
        }
      }
      catch (RemoteException e) {
        throw new RuntimeException(e);
      }
    }
@Override
    public void artifactDiscovered(ArtifactContext ac)