Example #1
0
 private void refreshAll() {
   Repository[] repos = featuresService.listRepositories();
   for (Repository repo : repos) {
     try {
       System.out.println("Refreshing feature url " + repo.getURI());
       featuresService.refreshRepository(repo.getURI());
     } catch (Exception e) {
       System.err.println("Error refreshing " + repo.getURI().toString() + ": " + e.getMessage());
     }
   }
 }
Example #2
0
 protected Object doExecute() throws Exception {
   if (nameOrUrl != null) {
     String effectiveVersion = (version == null) ? "LATEST" : version;
     URI uri = featureFinder.getUriFor(nameOrUrl, effectiveVersion);
     if (uri == null) {
       uri = new URI(nameOrUrl);
     }
     System.out.println("Refreshing feature url " + uri);
     featuresService.refreshRepository(uri);
   } else {
     refreshAll();
   }
   return null;
 }