java.lang.Object
com.github.blutorange.maven.plugin.closurecompiler.common.ProcessFilesTask
com.github.blutorange.maven.plugin.closurecompiler.common.ProcessJSFilesTask
All Implemented Interfaces:
Callable<List<ProcessingResult>>

public final class ProcessJSFilesTask extends ProcessFilesTask
Task for merging and compressing JavaScript files.
  • Constructor Details

    • ProcessJSFilesTask

      public ProcessJSFilesTask(MojoMetadata mojoMeta, FileProcessConfig processConfig, FileSpecifier fileSpecifier, ClosureConfig closureConfig) throws IOException
      Task constructor.
      Parameters:
      mojoMeta - Mojo meta (for log, project etc.)
      processConfig - Details about the process files task.
      fileSpecifier - Details about the input / output files.
      closureConfig - Google Closure Compiler configuration
      Throws:
      IOException - When an input file could not be read of an output file could not be written.
  • Method Details

    • minify

      protected ProcessingResult minify(File mergedFile, File minifiedFile) throws IOException, org.apache.maven.plugin.MojoFailureException
      Minifies a JavaScript file. Create missing parent directories if needed.
      Parameters:
      mergedFile - input file resulting from the merged step
      minifiedFile - output file resulting from the minify step
      Throws:
      IOException - when the minify step fails
      org.apache.maven.plugin.MojoFailureException - When the file could not be minified, either due to an I/O error or due to a closure compiler failure.
    • minify

      protected ProcessingResult minify(List<File> srcFiles, File minifiedFile) throws IOException, org.apache.maven.plugin.MojoFailureException
      Throws:
      IOException
      org.apache.maven.plugin.MojoFailureException