]> source.dussan.org Git - archiva.git/commitdiff
Adapting to event api change
authorMartin Stockhammer <martin.stockhammer@ars.de>
Tue, 27 Mar 2018 05:57:58 +0000 (07:57 +0200)
committerMartin Stockhammer <martin.stockhammer@ars.de>
Tue, 27 Mar 2018 05:57:58 +0000 (07:57 +0200)
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/ArchivaIndexManagerMock.java

index 049f4a7be4cbc52886f03e0a8d9eeab22144c1a0..16893d568e2ef462c3bc40acd672c8427ea6bab8 100644 (file)
@@ -492,6 +492,18 @@ public class ArchivaIndexManagerMock implements ArchivaIndexManager {
         }
     }
 
+    @Override
+    public void updateLocalIndexPath(Repository repo) {
+        if (repo.supportsFeature(IndexCreationFeature.class)) {
+            IndexCreationFeature icf = repo.getFeature(IndexCreationFeature.class).get();
+            try {
+                icf.setLocalIndexPath(getIndexPath(repo));
+            } catch (IOException e) {
+                log.error("Could not set local index path for {}. New URI: {}", repo.getId(), icf.getIndexPath());
+            }
+        }
+    }
+
     private Path getIndexPath(Repository repo) throws IOException {
         IndexCreationFeature icf = repo.getFeature(IndexCreationFeature.class).get();
         Path repoDir = repo.getLocalPath();