javascript:compress

Full name:

org.codehaus.mojo.javascript:javascript-maven-plugin:1.1-softec:compress

Description:

Goal used to strip and compress the JavaScript files from the target script directory

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: prepare-package.

Required Parameters

Name Type Since Description
localRepository ArtifactRepository - The local repository

Optional Parameters

Name Type Since Description
buildDirectory File - The output directory of the compressed javascript archive.
Default value is: ${project.build.directory}.
compressedDirectory File - The output directory of the compressed javascript files.
Default value is: ${project.build.directory}/compressed.
compressor String - The compressor to used. Either "shrinksafe", "yahooui" or "jsmin" for default compressor, or a custom one provided as an artifact in repo org.codehaus.mojo.javascript:[xxx]-compressor.
Default value is: jsmin.
excludes String[] - Exclusion patterns
includes String[] - Inclusion patterns
languageVersion int - JS Language version (130 for JS 1.3)
Default value is: 130.
optimizationLevel int - Optimization level, from 0 to 9
Default value is: 9.
remoteRepositories List - The remote repositories declared in the pom.
scriptClassifier String - optional extension for the compressed artifact. Example "compressed"
scriptsDirectory File - The intput directory for the source javascript files.
Default value is: ${project.build.outputDirectory}.
skipStats boolean - Don't display compression stats
strip String - A special token to recognize lines to be removed from scripts (debugging code).
strippedDirectory File - The output directory of the compressed javascript files.
Default value is: ${project.build.directory}/stripped.
strips String[] - A list of special token to recognize lines to be removed from scripts (debugging code).

Parameter Details

buildDirectory:

The output directory of the compressed javascript archive.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}

compressedDirectory:

The output directory of the compressed javascript files.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/compressed

compressor:

The compressor to used. Either "shrinksafe", "yahooui" or "jsmin" for default compressor, or a custom one provided as an artifact in repo org.codehaus.mojo.javascript:[xxx]-compressor.
  • Type: java.lang.String
  • Required: No
  • Default: jsmin

excludes:

Exclusion patterns
  • Type: java.lang.String[]
  • Required: No

includes:

Inclusion patterns
  • Type: java.lang.String[]
  • Required: No

languageVersion:

JS Language version (130 for JS 1.3)
  • Type: int
  • Required: No
  • Default: 130

localRepository:

The local repository
  • Type: org.apache.maven.artifact.repository.ArtifactRepository
  • Required: Yes
  • Expression: ${localRepository}

optimizationLevel:

Optimization level, from 0 to 9
  • Type: int
  • Required: No
  • Default: 9

remoteRepositories:

The remote repositories declared in the pom.
  • Type: java.util.List
  • Required: No
  • Expression: ${project.pluginArtifactRepositories}

scriptClassifier:

optional extension for the compressed artifact. Example "compressed"
  • Type: java.lang.String
  • Required: No

scriptsDirectory:

The intput directory for the source javascript files.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.outputDirectory}

skipStats:

Don't display compression stats
  • Type: boolean
  • Required: No

strip:

A special token to recognize lines to be removed from scripts (debugging code).
  • Type: java.lang.String
  • Required: No

strippedDirectory:

The output directory of the compressed javascript files.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/stripped

strips:

A list of special token to recognize lines to be removed from scripts (debugging code).
  • Type: java.lang.String[]
  • Required: No