Source:
<code>public void validateServerMetadata(File serverPath) throws MojoExecutionException { File serverProperties = new File(serverPath, SDKConstants.OPENMRS_SERVER_PROPERTIES); File installationProperties = new File(serverPath, "installation.properties"); Server server = null; if (installationProperties.exists()){ if(serverProperties.exists()){ FileUtils.deleteQuietly(installationProperties); } else { installationProperties.renameTo(serverProperties); } } if(serverProperties.exists()){ server = Server.loadServer(serverPath); String webappVersion = server.getWebappVersionFromFilesystem(); if(!webappVersion.equals(server.getPlatformVersion())){ String version = server.getVersion(); String platformVersion = server.getPlatformVersion(); if(platformVersion != null){ if(version!=null){ if(version.equals(server.getWebappVersionFromFilesystem())){ server.setPlatformVersion(version); server.setVersion(platformVersion); } else { throw new MojoExecutionException("Invalid versions configured in openmrs-server.properties file"); } } else { server.setVersion(platformVersion); } } else { server.setPlatformVersion(server.getWebappVersionFromFilesystem()); } } if(server.getVersion() != null){ if(server.getVersion().equals("2.3")){ this.parentTask.wizard.showMessage("Please note that Reference Application 2.3 is not supported" + "\nFunctions other than 'run' will not work properly, " + <START> "\nIt is recommended to use version 2.3.1 instead"); <END> } configureMissingDistroArtifact(server); if(!new File(serverPath, DistroProperties.DISTRO_FILE_NAME).exists()){ String distro = server.getDistroArtifactId() + ":" + server.getVersion(); parentTask.distroHelper.saveDistroPropertiesTo(serverPath, distro); } } } else throw new MojoExecutionException("There is no server properties file in this directory"); server.save(); }</code><technical_language>Please add "You easily upgrade calling mvn openmrs-sdk:deploy ..."</technical_language>

Target:
public void validateServerMetadata(File serverPath) throws MojoExecutionException { File serverProperties = new File(serverPath, SDKConstants.OPENMRS_SERVER_PROPERTIES); File installationProperties = new File(serverPath, "installation.properties"); Server server = null; if (installationProperties.exists()){ if(serverProperties.exists()){ FileUtils.deleteQuietly(installationProperties); } else { installationProperties.renameTo(serverProperties); } } if(serverProperties.exists()){ server = Server.loadServer(serverPath); String webappVersion = server.getWebappVersionFromFilesystem(); if(!webappVersion.equals(server.getPlatformVersion())){ String version = server.getVersion(); String platformVersion = server.getPlatformVersion(); if(StringUtils.isNotBlank(platformVersion)){ if(version!=null){ if(version.equals(server.getWebappVersionFromFilesystem())){ server.setPlatformVersion(version); server.setVersion(platformVersion); } else { throw new MojoExecutionException("Invalid versions configured in openmrs-server.properties file"); } } else { server.setVersion(platformVersion); } } else { server.setPlatformVersion(server.getWebappVersionFromFilesystem()); } } if(StringUtils.isNotBlank(server.getVersion())){ if(server.getVersion().equals("2.3")){ this.parentTask.wizard.showMessage("Please note that Reference Application 2.3 is not supported" + "\nFunctions other than 'run' will not work properly, " + "\nIt is recommended to use version 2.3.1 instead"); } configureMissingDistroArtifact(server); if(!new File(serverPath, DistroProperties.DISTRO_FILE_NAME).exists()){ String distro = server.getDistroArtifactId() + ":" + server.getVersion(); parentTask.distroHelper.saveDistroPropertiesTo(serverPath, distro); } } } else throw new MojoExecutionException("There is no server properties file in this directory"); server.save(); }