aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorMartin Stockhammer <martin.stockhammer@ars.de>2018-03-27 07:56:12 +0200
committerMartin Stockhammer <martin.stockhammer@ars.de>2018-03-27 07:56:12 +0200
commit4ea420ae99322713721db7a7d05302a2b56da2b5 (patch)
tree6bf88939950edc6336a618516982e45c104e93ef /archiva-modules
parentd1fcc2dd2e3578f87503d447607004752793a1e3 (diff)
downloadarchiva-4ea420ae99322713721db7a7d05302a2b56da2b5.tar.gz
archiva-4ea420ae99322713721db7a7d05302a2b56da2b5.zip
Changing event api
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java2
-rw-r--r--archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java4
-rw-r--r--archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java13
3 files changed, 16 insertions, 3 deletions
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
index 46dec05bf..05f877142 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
@@ -76,7 +76,7 @@ public class MavenManagedRepository extends AbstractManagedRepository
public MavenManagedRepository( String id, String name, Path basePath )
{
super( RepositoryType.MAVEN, id, name, basePath);
- this.indexCreationFeature = new IndexCreationFeature(id, this);
+ this.indexCreationFeature = new IndexCreationFeature(this, this);
}
public MavenManagedRepository( Locale primaryLocale, String id, String name, Path basePath )
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java
index f549e46dd..55305ca09 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRemoteRepository.java
@@ -64,14 +64,14 @@ public class MavenRemoteRepository extends AbstractRemoteRepository
public MavenRemoteRepository( String id, String name, Path basePath )
{
super( RepositoryType.MAVEN, id, name, basePath );
- this.indexCreationFeature = new IndexCreationFeature(id, this);
+ this.indexCreationFeature = new IndexCreationFeature(this, this);
}
public MavenRemoteRepository( Locale primaryLocale, String id, String name, Path basePath )
{
super( primaryLocale, RepositoryType.MAVEN, id, name, basePath );
- this.indexCreationFeature = new IndexCreationFeature(id, this);
+ this.indexCreationFeature = new IndexCreationFeature(this, this);
}
@Override
diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java
index 72114947d..f6f59250d 100644
--- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java
+++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/repository/index/mock/ArchivaIndexManagerMock.java
@@ -495,6 +495,19 @@ 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();