public void execute() throws MojoExecutionException, MojoFailureException {
    LogKit.setLog(getLog());
    try {
      getLog().info("Minifying all Javascript Files in the Output Directory");
      ClosureMinifier minifier = new ClosureMinifier();
      minifier.setSourceDirectory(sourceDirectory);
      List<File> filesToMinify;
      if (null != includeFiles) {
        filesToMinify = Lists.newArrayList(includeFiles);

        getLog().info("About to include the following files:  " + FileUtilities
            .getCommaSeparatedListOfFileNames(filesToMinify));
      } else {
        getLog().debug("No file to include,use sourceDirectory.");
        filesToMinify = FileUtilities.directoryToFileList(sourceDirectory);
      }
      List<File> filesToMinifyMinusDestFile = null;
      if (null != excludeFiles) {
        filesToMinifyMinusDestFile = getMinifyFiles(filesToMinify, Lists.newArrayList(excludeFiles));
      } else {
        filesToMinifyMinusDestFile = filesToMinify;
      }

      if (filesToMinifyMinusDestFile != null && filesToMinifyMinusDestFile.size() > 0) {
        getLog().info("About to minify the following files:  " + FileUtilities
            .getCommaSeparatedListOfFileNames(filesToMinifyMinusDestFile));
      } else {
        getLog().info("No file  to minify.");
      }
      if (merge) {
        minifier.compile(filesToMinifyMinusDestFile, outputFile);
      } else {
        minifier.setOutputDirectory(outputDirectory);
        minifier.compile(filesToMinifyMinusDestFile);

      }
    } catch (Exception e) {
      throw new MojoExecutionException(e.getMessage(), e);
    }
  }