code: public static void resolveVariables(Model model)
      {
          // Resolve version
          model.setVersion(resolveVersion(model));
  
          // Resolve groupid
          model.setGroupId(resolveGroupId(model));
  
          // Resolve properties
          for (Map.Entry<Object, Object> entry : model.getProperties().entrySet()) {
              if (entry.getValue() instanceof String) {
                  String value = (String) entry.getValue();
                  entry.setValue(value.replace("${project.version}", model.getVersion()));
              }
          }
      }
docs: TODO: use standard Maven tools for that