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].*");
}
System.out.println();
GAV newGAV = new GAV(gav.groupId, gav.artifactId, newestVersion.toString());
if (install) {
ACommand installPluginCmd = commandService.getCommand(Bees.SDK_PLUGIN_INSTALL);
System.out.println("Installing plugin: " + newGAV);
installPluginCmd.run(Arrays.asList(Bees.SDK_PLUGIN_INSTALL, newGAV.toString()));
} else {