}
} catch (IOException e) {
e.printStackTrace();
}
Repository repo = repoProvider.getRepo(req.getRepoType(), req.getRepo());
List<Artifact> possibleArtifactsFor = repo.getPossibleArtifactsFor(req);
if (possibleArtifactsFor != null) {
Collections.sort(possibleArtifactsFor, Artifact.getArtifactComparator(true));
for (Artifact a: possibleArtifactsFor) {
if (req.matches(a.getName(), a.getVersion())) {
return a;