protected void updatePropertyToNewestVersion(
      ModifiedPomXMLEventReader pom,
      Property property,
      PropertyVersions version,
      String currentVersion)
      throws MojoExecutionException, XMLStreamException {
    ArtifactVersion winner =
        version.getNewestVersion(
            currentVersion, property, this.allowSnapshots, this.reactorProjects, this.getHelper());

    if (winner == null || currentVersion.equals(winner.toString())) {
      getLog()
          .info("Property ${" + property.getName() + "}: Leaving unchanged as " + currentVersion);
    } else if (PomHelper.setPropertyVersion(
        pom, version.getProfileId(), property.getName(), winner.toString())) {
      getLog()
          .info("Updated ${" + property.getName() + "} from " + currentVersion + " to " + winner);
    }
  }