code: public static String getBuildPluginVersion(AbstractWisdomMojo mojo, String plugin) {
          List<Plugin> plugins = mojo.project.getBuildPlugins();
          for (Plugin plug : plugins) {
              if (plug.getArtifactId().equals(plugin)) {
                  return plug.getVersion();
              }
          }
          // Not found.
          return null;
      }
docs: Retrieves the plugin version from Maven Project.
  
  @param mojo   the mojo
  @param plugin the artifact id of the plugin
  @return the version, {@code null} if the Maven Project does not used the given plugin