code: public void execute() throws MojoExecutionException, MojoFailureException {
      if (skip) {
        getLog().info("Skipping format check");
        return;
      }
      if ("pom".equals(packaging)) {
        getLog().info("Skipping format check: project uses 'pom' packaging");
        return;
      }
      if (skipSortingImports) {
        getLog().info("Skipping sorting imports");
      }
      List<File> directoriesToFormat = new ArrayList<File>();
      if (sourceDirectory.exists()) {
        directoriesToFormat.add(sourceDirectory);
      } else {
        handleMissingDirectory("Source", sourceDirectory);
      }
      if (testSourceDirectory.exists()) {
        directoriesToFormat.add(testSourceDirectory);
      } else {
        handleMissingDirectory("Test source", testSourceDirectory);
      }
  
      for (File additionalSourceDirectory : additionalSourceDirectories) {
        if (additionalSourceDirectory.exists()) {
          directoriesToFormat.add(additionalSourceDirectory);
        } else {
          handleMissingDirectory("Additional source", additionalSourceDirectory);
        }
      }
  
      Formatter formatter = getFormatter();
  
      for (File directoryToFormat : directoriesToFormat) {
        formatSourceFilesInDirectory(directoryToFormat, formatter);
      }
  
      logNumberOfFilesProcessed();
      postExecute(this.filesProcessed, this.nonComplyingFiles);
    }
docs: execute.
  
  @throws org.apache.maven.plugin.MojoExecutionException if any.