code: public void execute()
          throws MojoExecutionException, MojoFailureException
      {
          if ( isSkipping() )
          {
              getLog().debug( "Skipping execution, as demanded by user." );
              return;
          }
  
          if ( useDefaultFormatFileSet )
          {
              formatFileSets.add( FormatFileSet.getDefault( getBasedir(), encoding, indentSize ) );
          }
          if ( formatFileSets == null || formatFileSets.isEmpty() )
          {
              /* nothing to do */
              return;
          }
  
          ViolationCollector violationCollector = new ViolationCollector();
  
          int processedFileCount = 0;
  
          for ( FormatFileSet formatFileSet : formatFileSets )
          {
              String effectiveEncoding = formatFileSet.getEncoding();
              if ( effectiveEncoding == null )
              {
                  effectiveEncoding = this.encoding;
              }
              String[] includedFiles = scan( formatFileSet );
              for ( String includedPath : includedFiles )
              {
                  processedFileCount++;
                  File file = new File( formatFileSet.getDirectory(), includedPath );
                  check( file, effectiveEncoding, violationCollector );
                  if ( getLog().isDebugEnabled() && !violationCollector.hasViolations( file ) )
                  {
                      getLog().debug( "No XML formatting violations found in file " + file.getAbsolutePath() );
                  }
              }
          }
          getLog().debug( "Checked the formatting of " + processedFileCount + " files" );
  
          if ( failOnFormatViolation && violationCollector.hasViolations() )
          {
              throw new MojoFailureException( "There are XML formatting violations. Check the above log for details." );
          }
  
      }
docs: Called by Maven for executing the Mojo.
  
  @throws MojoExecutionException Running the Mojo failed.
  @throws MojoFailureException A configuration error was detected.