try {
repositorySystem.retrieve(repository, file, remoteRelpath, null);
} catch (ArtifactTransferFailedException cause) {
IOException e = new FileNotFoundException();
e.initCause(cause);
throw e;
} catch (ArtifactDoesNotExistException cause) {
IOException e = new FileNotFoundException();
e.initCause(cause);
throw e;