private Artifact resolveLatestVersionRange(RepositorySystemSession session, Artifact artifact)
throws VersionRangeResolutionException {
if (artifact.getVersion().equals("LATEST")) {
artifact = artifact.setVersion(LATEST_VERSION_RANGE);
VersionRangeResult versionResult = m_repoSystem.resolveVersionRange(session, new VersionRangeRequest(artifact, m_remoteRepos, null));
if (versionResult != null) {
Version v = versionResult.getHighestVersion();
if (v != null) {
artifact = artifact.setVersion(v.toString());
} else {
throw new VersionRangeResolutionException(versionResult, "Not highest version found for " + artifact);