use of org.apache.archiva.common.filelock.FileLockManager in project archiva by apache.
the class MavenRemoteRepository method newLocalInstance.
public static MavenRemoteRepository newLocalInstance(String id, String name, Path basePath) throws IOException {
FileLockManager lockManager = new DefaultFileLockManager();
FilesystemStorage storage = new FilesystemStorage(basePath.resolve(id), lockManager);
return new MavenRemoteRepository(id, name, storage);
}
use of org.apache.archiva.common.filelock.FileLockManager in project archiva by apache.
the class BasicRepositoryGroup method newFilesystemInstance.
/**
* Creates a filesystem based repository instance. The path is built by basePath/repository-id
*
* @param id The repository id
* @param name The name of the repository
* @param repositoryPath The path to the repository
* @return The repository instance
* @throws IOException
*/
public static BasicRepositoryGroup newFilesystemInstance(String id, String name, Path repositoryPath) throws IOException {
FileLockManager lockManager = new DefaultFileLockManager();
FilesystemStorage storage = new FilesystemStorage(repositoryPath, lockManager);
return new BasicRepositoryGroup(id, name, storage);
}
use of org.apache.archiva.common.filelock.FileLockManager in project archiva by apache.
the class RepositoryGroupHandlerTest method createRepository.
protected EditableRepositoryGroup createRepository(String id, String name, Path location) throws IOException {
FileLockManager lockManager = new DefaultFileLockManager();
FilesystemStorage storage = new FilesystemStorage(location.toAbsolutePath(), lockManager);
BasicRepositoryGroup repo = new BasicRepositoryGroup(id, name, storage);
repo.setLocation(location.toAbsolutePath().toUri());
return repo;
}
use of org.apache.archiva.common.filelock.FileLockManager in project archiva by apache.
the class MavenRepositoryGroup method newLocalInstance.
public static MavenRepositoryGroup newLocalInstance(String id, String name, Path basePath) throws IOException {
FileLockManager lockManager = new DefaultFileLockManager();
FilesystemStorage storage = new FilesystemStorage(basePath.resolve(id), lockManager);
return new MavenRepositoryGroup(id, name, storage);
}
use of org.apache.archiva.common.filelock.FileLockManager in project archiva by apache.
the class RepositoryGroupHandlerTest method getRemote.
protected RemoteRepository getRemote(String id, String name) throws IOException {
Path path = getRepoBaseDir().resolve("../remote");
FileLockManager lockManager = new DefaultFileLockManager();
FilesystemStorage storage = new FilesystemStorage(path.toAbsolutePath(), lockManager);
return new BasicRemoteRepository(id, name, storage);
}
Aggregations