System.out.println(String.format("Checking [%s] for newer version...", gav));
ArtifactInstallFactory installFactory = artifactInstallFactoryProvider.get();
if (localrepo != null)
installFactory.setLocalRepository(localrepo);
VersionRangeResult rangeResult = installFactory.findVersions(gav);
Version newestVersion = rangeResult.getHighestVersion();
VersionNumber currentVersion = new VersionNumber(gav.version);
VersionNumber availableVersion = new VersionNumber(newestVersion.toString());
System.out.println();
if (currentVersion.compareTo(availableVersion) < 0) {
System.out.println("A newest version [" + newestVersion + "] exists from repository: "
+ rangeResult.getRepository(newestVersion));
boolean install = true;
if (force == null || !force.booleanValue()) {
System.out.println();
install = Helper.promptMatches("Do you want to install the latest version [" + newestVersion + "]: (y/n) ", "[yY].*");