use of org.apache.archiva.repository.base.managed.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;
try {
BasicManagedRepository managedRepository = BasicManagedRepository.newFilesystemInstance(id, configuration.getName(), Paths.get("target/repositories"));
updateManagedInstance(managedRepository, configuration);
return managedRepository;
} catch (IOException e) {
throw new RepositoryException(e);
}
}
use of org.apache.archiva.repository.base.managed.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 = null;
try {
managedRepository = BasicManagedRepository.newFilesystemInstance(id, configuration.getName(), Paths.get("target/repositories").resolve(id));
} catch (IOException e) {
throw new RepositoryException(e);
}
updateManagedInstance(managedRepository, configuration);
return managedRepository;
}
use of org.apache.archiva.repository.base.managed.BasicManagedRepository in project archiva by apache.
the class RepositoryContentConsumersTest method createRepository.
protected ManagedRepository createRepository(String id, String name, Path location) throws IOException {
BasicManagedRepository repo = BasicManagedRepository.newFilesystemInstance(id, name, location.getParent().resolve(id));
repo.setLocation(location.toAbsolutePath().toUri());
return repo;
}
use of org.apache.archiva.repository.base.managed.BasicManagedRepository in project archiva by apache.
the class RepositoryProviderMock method createManagedInstance.
@Override
public ManagedRepository createManagedInstance(ManagedRepositoryConfiguration configuration) throws RepositoryException {
BasicManagedRepository managedRepository = null;
try {
managedRepository = BasicManagedRepository.newFilesystemInstance(configuration.getId(), configuration.getName(), Paths.get("target/repositories").resolve(configuration.getId()));
} catch (IOException e) {
throw new RepositoryException(e);
}
updateManagedInstance(managedRepository, configuration);
return managedRepository;
}
use of org.apache.archiva.repository.base.managed.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 = null;
try {
managedRepository = BasicManagedRepository.newFilesystemInstance(id, configuration.getName(), Paths.get("target/repositories").resolve(id));
} catch (IOException e) {
throw new RepositoryException(e);
}
updateManagedInstance(managedRepository, configuration);
managedRepository.getFeature(StagingRepositoryFeature.class).setStageRepoNeeded(false);
return managedRepository;
}
Aggregations