javascript:war-compress

Full name:

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

Description:

Goal to be used from a war project, to compress the scripts present in the webapp packaging folder. Configured to run in the test phase as there is no way (in maven 2.0) to run between exploded webapp assembly and .war packaging.

Attributes:

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

Required Parameters

Name Type Since Description
localRepository ArtifactRepository - The local repository
webappDirectory File - The directory where the webapp is built.

Optional Parameters

Name Type Since Description
classifier String - classifier for the compressed artifact. If not set, compressed script will replace uncompressed ones, and will apply without any change in HTML/JSP.
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.
scripts String - Folder in webapp containing javascripts
Default value is: scripts.
skipStats boolean - Don't display compression stats
strip String - A special token to recognize lines to be removed from scripts (debugging code).
strips String[] - A list of special token to recognize lines to be removed from scripts (debugging code).

Parameter Details

classifier:

classifier for the compressed artifact. If not set, compressed script will replace uncompressed ones, and will apply without any change in HTML/JSP.
  • Type: java.lang.String
  • Required: No

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}

scripts:

Folder in webapp containing javascripts
  • Type: java.lang.String
  • Required: No
  • Default: scripts

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

strips:

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

webappDirectory:

The directory where the webapp is built.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.directory}/${project.build.finalName}