|
|
@@ -120,21 +120,29 @@ public abstract class AbstractRepositoryPurgeTest |
|
|
|
|
|
|
|
previousArchivaConfiguration = ( (DefaultManagedRepositoryAdmin) applicationContext.getBean( |
|
|
|
ManagedRepositoryAdmin.class ) ).getArchivaConfiguration(); |
|
|
|
|
|
|
|
removeMavenIndexes(); |
|
|
|
} |
|
|
|
|
|
|
|
@After |
|
|
|
public void tearDown() |
|
|
|
throws Exception |
|
|
|
{ |
|
|
|
removeMavenIndexes(); |
|
|
|
super.tearDown(); |
|
|
|
config = null; |
|
|
|
repo = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected void removeMavenIndexes() |
|
|
|
throws Exception |
|
|
|
{ |
|
|
|
NexusIndexer nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class ); |
|
|
|
for ( IndexingContext indexingContext : nexusIndexer.getIndexingContexts().values() ) |
|
|
|
{ |
|
|
|
nexusIndexer.removeIndexingContext( indexingContext, false ); |
|
|
|
} |
|
|
|
super.tearDown(); |
|
|
|
config = null; |
|
|
|
repo = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public ManagedRepository getRepoConfiguration( String repoId, String repoName ) |