@SuppressWarnings({"deprecation"})
public static void main(String[] args) {
CollabReview collabReview = AutoConfigurator.newConfiguredApplication();
ArrayList<ImportProgressInfo> ipis = new ArrayList<ImportProgressInfo>();
Importer importer = collabReview.getImporter();
importer.start();
long startTime = System.currentTimeMillis();
ImportProgressInfo currentIpi = null;
while (System.currentTimeMillis() < startTime + 10000) {
ImportProgressInfo ipi = importer.getProgressInfo();
if (!ipi.equals(currentIpi)) {
currentIpi = ipi;
ipis.add(ipi);
}
try {
Thread.sleep(10);
} catch (InterruptedException e) {
}
}
importer.shutdown();
for (ImportProgressInfo ipi : ipis) {
logger.debug(ipi);
}
logger.info("The repository contains " + collabReview.getRepository().listAllArtifacts().size()
+ " artifacts, out of which " + collabReview.getRepository().listNonObsoleteArtifacts(null).size()