private void updateMavenVersionLabel() {
    boolean localTarget = myTargetName == null;
    MavenHomeType type = resolveMavenHomeType(mavenHomeField.getText().trim());
    String version = null;
    if (type instanceof StaticResolvedMavenHomeType sType) {
      version = MavenUtil.getMavenVersion(sType);
    }
    String versionText = null;
    if (version != null) {
      if (StringUtil.compareVersionNumbers(version, "3.1") < 0) {
        versionText = getUnsupportedMavenMessage(version);
      }
      else {
        versionText = MavenProjectBundle.message("label.invalid.maven.home.version", version);
      }
    }
    else if (localTarget) {
      versionText = type.getTitle();
    }
    mavenVersionLabelComponent.getComponent().setText(StringUtil.notNullize(versionText));
  }
private void updateMavenVersionLabel()