watcher.start();
}
if (list) {
// list the watched bundles.
TablePrinter printer = new TablePrinter();
printer.columns("url", "profile", "version", "bundle");
for (String url : watcher.getWatchURLs()) {
Map<ProfileVersionKey, Map<String, Parser>> profileArtifacts = watcher.getProfileArtifacts();
if (profileArtifacts.size() > 0) {
Set<Map.Entry<ProfileVersionKey, Map<String, Parser>>> entries = profileArtifacts.entrySet();
for (Map.Entry<ProfileVersionKey, Map<String, Parser>> entry : entries) {
ProfileVersionKey key = entry.getKey();
Map<String, Parser> artifactMap = entry.getValue();
Set<Map.Entry<String, Parser>> artifactMapEntries = artifactMap.entrySet();
for (Map.Entry<String, Parser> artifactMapEntry : artifactMapEntries) {
String location = artifactMapEntry.getKey();
Parser parser = artifactMapEntry.getValue();
if (isSnapshot(parser) || watcher.wildCardMatch(location, url)) {
printer.row(url, key.getProfileId(), key.getVersion(), location);
}
}
}
} else {
printer.row(url, "", "", "");
}
}
printer.print();
} else {
List<String> urls = watcher.getWatchURLs();
if (urls != null && urls.size() > 0) {
System.out.println("Watched URLs: ");
for (String url : watcher.getWatchURLs()) {