use of org.apache.archiva.repository.BasicManagedRepository in project archiva by apache.
the class ArchivaIndexingTaskExecutorTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
Path baseDir = Paths.get(System.getProperty("basedir"), "target/test-classes").toAbsolutePath();
BasicManagedRepository repositoryConfig = new BasicManagedRepository("test-repo", "Test Repository", baseDir);
Path repoLocation = baseDir.resolve("test-repo");
repositoryConfig.setLocation(repoLocation.toUri());
repositoryConfig.setLayout("default");
repositoryConfig.setScanned(true);
repositoryConfig.addActiveReleaseScheme(ReleaseScheme.RELEASE);
repositoryConfig.removeActiveReleaseScheme(ReleaseScheme.SNAPSHOT);
repositoryRegistry.putRepository(repositoryConfig);
repo = repositoryRegistry.getManagedRepository(repositoryConfig.getId());
}
use of org.apache.archiva.repository.BasicManagedRepository in project archiva by apache.
the class RepositoryContentConsumersTest method createRepository.
protected ManagedRepository createRepository(String id, String name, Path location) {
BasicManagedRepository repo = new BasicManagedRepository(id, name, location.getParent());
repo.setLocation(location.toAbsolutePath().toUri());
return repo;
}
use of org.apache.archiva.repository.BasicManagedRepository in project archiva by apache.
the class RepositoryProviderMock method createManagedInstance.
@Override
public ManagedRepository createManagedInstance(ManagedRepositoryConfiguration configuration) throws RepositoryException {
BasicManagedRepository managedRepository = new BasicManagedRepository(configuration.getId(), configuration.getName(), Paths.get("target/repositories"));
updateManagedInstance(managedRepository, configuration);
return managedRepository;
}
use of org.apache.archiva.repository.BasicManagedRepository in project archiva by apache.
the class RepositoryProviderMock method createStagingInstance.
@Override
public ManagedRepository createStagingInstance(ManagedRepositoryConfiguration configuration) throws RepositoryException {
String id = configuration.getId() + StagingRepositoryFeature.STAGING_REPO_POSTFIX;
BasicManagedRepository managedRepository = new BasicManagedRepository(id, configuration.getName(), Paths.get("target/repositories"));
updateManagedInstance(managedRepository, configuration);
managedRepository.getFeature(StagingRepositoryFeature.class).get().setStageRepoNeeded(false);
return managedRepository;
}
use of org.apache.archiva.repository.BasicManagedRepository in project archiva by apache.
the class NexusIndexerConsumerTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
scheduler = new ArchivaTaskSchedulerStub();
ArchivaConfiguration configuration = applicationContext.getBean(ArchivaConfiguration.class);
FileTypes filetypes = applicationContext.getBean(FileTypes.class);
nexusIndexerConsumer = new NexusIndexerConsumer(scheduler, configuration, filetypes, indexCreators, managedRepositoryAdmin);
// initialize to set the file types to be processed
nexusIndexerConsumer.initialize();
repositoryConfig = new BasicManagedRepository("test-repo", "Test Repository", Paths.get("target/test-classes"));
repositoryConfig.setLocation(new URI("target/test-classes/test-repo"));
repositoryConfig.setLayout("default");
repositoryConfig.setScanned(true);
repositoryConfig.addActiveReleaseScheme(ReleaseScheme.RELEASE);
repositoryConfig.removeActiveReleaseScheme(ReleaseScheme.SNAPSHOT);
repositoryRegistry.putRepository(repositoryConfig);
}
Aggregations