mirror of
https://github.com/apache/archiva.git
synced 2025-02-22 01:44:47 +00:00
Changing event api
This commit is contained in:
parent
d1fcc2dd2e
commit
4ea420ae99
@ -76,7 +76,7 @@ public class MavenManagedRepository extends AbstractManagedRepository
|
|||||||
public MavenManagedRepository( String id, String name, Path basePath )
|
public MavenManagedRepository( String id, String name, Path basePath )
|
||||||
{
|
{
|
||||||
super( RepositoryType.MAVEN, id, name, 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 )
|
public MavenManagedRepository( Locale primaryLocale, String id, String name, Path basePath )
|
||||||
|
@ -64,14 +64,14 @@ public class MavenRemoteRepository extends AbstractRemoteRepository
|
|||||||
public MavenRemoteRepository( String id, String name, Path basePath )
|
public MavenRemoteRepository( String id, String name, Path basePath )
|
||||||
{
|
{
|
||||||
super( RepositoryType.MAVEN, id, name, 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 )
|
public MavenRemoteRepository( Locale primaryLocale, String id, String name, Path basePath )
|
||||||
{
|
{
|
||||||
super( primaryLocale, RepositoryType.MAVEN, id, name, basePath );
|
super( primaryLocale, RepositoryType.MAVEN, id, name, basePath );
|
||||||
this.indexCreationFeature = new IndexCreationFeature(id, this);
|
this.indexCreationFeature = new IndexCreationFeature(this, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -495,6 +495,19 @@ public ArchivaIndexingContext move(ArchivaIndexingContext context, Repository re
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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 {
|
private Path getIndexPath(Repository repo) throws IOException {
|
||||||
IndexCreationFeature icf = repo.getFeature(IndexCreationFeature.class).get();
|
IndexCreationFeature icf = repo.getFeature(IndexCreationFeature.class).get();
|
||||||
Path repoDir = repo.getLocalPath();
|
Path repoDir = repo.getLocalPath();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user