use of org.apache.archiva.configuration.model.ManagedRepositoryConfiguration in project archiva by apache.
the class FileMetadataRepository method getBaseDirectory.
private Path getBaseDirectory(String repoId) throws IOException {
if (!baseDirectory.containsKey(repoId)) {
Path baseDir;
ManagedRepositoryConfiguration managedRepositoryConfiguration = configuration.getConfiguration().getManagedRepositoriesAsMap().get(repoId);
if (managedRepositoryConfiguration == null) {
baseDir = Files.createTempDirectory(repoId);
} else {
baseDir = Paths.get(managedRepositoryConfiguration.getLocation());
}
baseDirectory.put(repoId, baseDir.resolve(".archiva"));
}
return baseDirectory.get(repoId);
}
use of org.apache.archiva.configuration.model.ManagedRepositoryConfiguration in project archiva by apache.
the class FileMetadataRepositoryTest method createManagedRepository.
private static ManagedRepositoryConfiguration createManagedRepository(String repoId, Path directory) {
ManagedRepositoryConfiguration managedRepository = new ManagedRepositoryConfiguration();
managedRepository.setId(repoId);
managedRepository.setLocation(directory.resolve(repoId).toAbsolutePath().toString());
return managedRepository;
}
Aggregations