code: public void execute()
          throws MojoExecutionException, MojoFailureException
      {
  
          getLog().info( "Generating flattened POM of project " + this.project.getId() + "..." );
  
          File originalPomFile = this.project.getFile();
          Model flattenedPom = createFlattenedPom( originalPomFile );
          String headerComment = extractHeaderComment( originalPomFile );
  
          File flattenedPomFile = getFlattenedPomFile();
          writePom( flattenedPom, flattenedPomFile, headerComment );
  
          if ( isUpdatePomFile() )
          {
              this.project.setPomFile( flattenedPomFile );
          }
      }
docs: {@inheritDoc}