code: public void execute()
          throws MojoExecutionException, MojoFailureException
      {
          if ( isSkipping() )
          {
              getLog().debug( "Skipping execution, as demanded by user." );
              return;
          }
  
          final ValidationErrorHandler errorHandler = new ValidationErrorHandler();
          if ( validationSets == null || validationSets.length == 0 )
          {
              throw new MojoFailureException( "No ValidationSets configured." );
          }
          checkCatalogHandling();
  
          Object oldProxySettings = activateProxy();
          try
          {
              Resolver resolver = getResolver();
              for ( int i = 0; i < validationSets.length; i++ )
              {
                  ValidationSet validationSet = validationSets[i];
                  resolver.setXincludeAware(validationSet.isValidating() );
                  resolver.setValidating( validationSet.isValidating() );
                  validate( resolver, validationSet ,errorHandler);
              }
              List<ValidationErrorHandler.ErrorRecord> errorRecords=errorHandler.getErrors();
              if (!errorRecords.isEmpty()){
                  final StringBuffer message=new StringBuffer();
                  for(ValidationErrorHandler.ErrorRecord error:errorRecords){
                      appendMessage(message,error);
                  }
                  if (errorHandler.getErrorCount()+errorHandler.getFatalCount()>0){
                      throw new MojoExecutionException( message.toString());
                  }
                  else{
                      getLog().warn(message.toString());
                  }
              }
          }
          finally
          {
              passivateProxy( oldProxySettings );
          }
      }
docs: Called by Maven for executing the Mojo.
  
  @throws MojoExecutionException Running the Mojo failed.
  @throws MojoFailureException A configuration error was detected.