@Override public String toString() { return version.toString(); } }
@Override public SPluginBundle execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException, ServerException { if (bimServer.getVersionChecker() != null && bimServer.getVersionChecker().getLocalVersion() != null) { bimserverVersion = new DefaultArtifactVersion(bimServer.getVersionChecker().getLocalVersion().getFullString()); LOGGER.info(bimserverVersion.toString()); } else { LOGGER.info("No BIMserver version"); } MavenPluginLocation pluginLocation = bimServer.getMavenPluginRepository().getPluginLocation(repository, groupId, artifactId); SPluginBundle sPluginBundle = processPluginLocation(pluginLocation, strictChecking, bimserverVersion); if (sPluginBundle != null) { return sPluginBundle; } else { throw new UserException("No plugin bundle available for your version of BIMserver: " + groupId + "." + artifactId); } } }
localVersion.setMinor(defaultArtifactVersion.getMinorVersion()); localVersion.setRevision(defaultArtifactVersion.getIncrementalVersion()); localVersion.setFullString(defaultArtifactVersion.toString()); } catch (Exception e) { throw new VersionCheckException(e);
private boolean promptForUpdatePlain(DefaultArtifactVersion ampsVersionInPom, DefaultArtifactVersion runningVersion) throws PrompterException { StringBuilder builder = new StringBuilder(); builder.append("You are running SDK version ") .append(runningVersion.toString()) .append(" but your pom is using version ") .append(ampsVersionInPom.toString()) .append("\n") .append("Would you like to have your pom updated?"); return promptForBoolean(builder.toString(), "Y"); }
if (logger.isInfoEnabled()) { logger.info("Configuration found in the DB is older version than the default one: " + defVersion.toString());
return latestVersion.toString();
return latestVersion.toString();
private boolean promptForUpdateAnsi(DefaultArtifactVersion ampsVersionInPom, DefaultArtifactVersion runningVersion) throws PrompterException { ANSIBuffer ansiBuffer = new ANSIBuffer(); ansiBuffer.append(ANSIBuffer.ANSICodes.attrib(PrettyPrompter.FG_YELLOW)) .append("You are running SDK version ") .append(runningVersion.toString()) .append(" but your pom is using version ") .append(ampsVersionInPom.toString()) .append("\n") .append(ANSIBuffer.ANSICodes.attrib(PrettyPrompter.OFF)) .append(ANSIBuffer.ANSICodes.attrib(PrettyPrompter.BOLD)) .append("Would you like to have your pom updated?") .append(ANSIBuffer.ANSICodes.attrib(PrettyPrompter.OFF)); return promptForBoolean(ansiBuffer.toString(),"Y"); }
artifact = artifactFactory.createProjectArtifact( companyPom.getGroupId(), companyPom.getArtifactId(), artifactVersion.toString() );