}
}
public Version resolveVersion(String artifactName) {
Artifact artifact = new DefaultArtifact( artifactName );
VersionRangeRequest versionRequest = new VersionRangeRequest();
versionRequest.setArtifact(artifact);
for (RemoteRepository repo : remoteRepositoriesForRequest) {
versionRequest.addRepository(repo);
}
try {
VersionRangeResult versionRangeResult = aether.getSystem().resolveVersionRange(aether.getSession(), versionRequest);
return versionRangeResult.getHighestVersion();
} catch (VersionRangeResolutionException e) {