code: protected void executeLicenseGoal(String goal) throws MojoExecutionException
      {
          // Find the license plugin (it's project's responsibility to make sure the License plugin is properly setup in
          // its <pluginManagement>, for most XWiki projects it just mean inherits from xwiki-commons-pom)
          Plugin licensePlugin =
              this.project.getPluginManagement().getPluginsAsMap().get("com.mycila:license-maven-plugin");
  
          if (licensePlugin == null) {
              throw new MojoExecutionException("License plugin could not be found in <pluginManagement>");
          }
  
          executeMojo(
              licensePlugin,
              goal(goal),
              configuration(
                  element(name("header"), "license.txt"),
                  element(name("strictCheck"), "true"),
                  element(name("headerDefinitions"),
                      element(name("headerDefinition"), "license-xml-definition.xml")),
                  element(name("includes"),
                      element(name("include"), "src/main/resources/**/*.xml"))
              ),
              executionEnvironment(
                  this.project,
                  this.mavenSession,
                  this.pluginManager
              )
          );
      }
docs: Executes a goal of the Maven License plugin (used for adding or checking for license headers.
  
  @param goal the goal of the Maven License plugin to call
  @exception MojoExecutionException when the License plugins fails or if it's not found