Full name:
com.github.blutorange:closure-compiler-maven-plugin:2.30.0:minify
Description:
Attributes:
process-resources
.Name | Type | Since | Description |
---|---|---|---|
<allowReplacingInputFiles> |
boolean |
- |
By default, when the output file is the same as the input file, compilation is terminated with an error. This is done to prevent source files from being overwritten accidentally with a bad configuration. If you are certain you want to replace the input files (such as when the input files themselves are temporary files that have been generated), set this option to true . Defaults to false .
Note: When enabling this option, you might also want to set Default value is: false .User property is: allowReplacingInputFiles . |
<baseSourceDir> |
File |
- |
Base directory for source files. This should be an absolute path; if not, it must be relative to the project base directory. Use variables such as basedir to make it relative to the current directory.Default value is: ${basedir}/src/main/webapp .User property is: baseSourceDir . |
<baseTargetDir> |
File |
- |
Base directory for output files. This should be an absolute path; if not, it must be relative to the project base directory. Use variables such as project.build.directory to make it relative to the current directory.Default value is: ${project.build.directory}/${project.build.finalName} .User property is: baseTargetDir . |
<bufferSize> |
int |
- |
Size of the buffer used to read source files. Default value is: 4096 .User property is: bufferSize . |
<bundleConfiguration> |
String |
1.7.5 |
Specify aggregations in an external JSON formatted config file. If not an absolute path, it must be relative to the project base directory. User property is: bundleConfiguration . |
<closureAllowDynamicImport> |
boolean |
2.21.0 |
Enables experimental support for allowing dynamic import expressions import('./path') to pass through the compiler unchanged. Enabling this requires setting closureLanguageOut to at least ECMASCRIPT_2020 .Default value is: false .User property is: closureAllowDynamicImport . |
<closureAngularPass> |
boolean |
1.7.3 |
Generate $inject properties for AngularJS for functions annotated with @ngInject .Default value is: false .User property is: closureAngularPass . |
<closureAssumeFunctionWrapper> |
boolean |
2.1 |
Enable additional optimizations based on the assumption that the output will be wrapped with a function wrapper. This flag is used to indicate that "global" declarations will not actually be global but instead isolated to the compilation unit. This enables additional optimizations. Default value is: false .User property is: closureAssumeFunctionWrapper . |
<closureChunkOutputType> |
CompilerOptions$ChunkOutputType |
2.27.0 |
Regardless of input type, the compiler will normalize all files and bundle them together. By default, a single output file is produced. However, this may not work for you if your application is really big. In that case, you may want to have the compiler break your code up into multiple chunks that can be loaded separately. You will design your application so that the code you always need gets loaded in an initial chunk, probably from a <script> tag, then that chunk will load others (which may load still others) as needed in order to support the user's actions. (e.g. The user may request a new display view, which requires you to load the code for showing that view.)
Default value is: GLOBAL_NAMESPACE .User property is: closureChunkOutputType . |
<closureColorizeErrorOutput> |
boolean |
2.0.0 |
Whether the error output from the closure compiler is colorized. Color codes may not be supported by all terminals. Default value is: true .User property is: closureColorizeErrorOutput . |
<closureCompilationLevel> |
CompilationLevel |
1.7.2 |
The degree of compression and optimization to apply to your JavaScript.
There are three possible compilation levels:
Default value is: SIMPLE_OPTIMIZATIONS .User property is: closureCompilationLevel . |
<closureCreateSourceMap> |
boolean |
2.1.0 |
Collects information mapping the generated (compiled) source back to its original source for debugging purposes. Default value is: false .User property is: closureCreateSourceMap . |
<closureDebug> |
boolean |
2.1.0 |
Enable debugging options. Property renaming uses long mangled names which can be mapped back to the original name. Default value is: false .User property is: closureDebug . |
<closureDefineReplacements> |
HashMap<String,String> |
1.7.5 |
Override the value of variables annotated with @define .
The format is:
<name> is the name of a @define variable and value is a JavaScript boolean, number or string literal. That is, use quotation marks to specify a string: "First line\nseconds line" User property is: closureDefineReplacements . |
<closureDependencyEntryPoints> |
ArrayList<String> |
2.0.0 |
When you use Adds a collection of symbols to always keep. In dependency pruning mode, we will automatically keep all the transitive dependencies of these symbols. The syntactic form of a symbol depends on the type of dependency primitives we're using. For example, There are two different types of entry points, closures and modules:
User property is: closureDependencyEntryPoints . |
<closureDependencyMode> |
DependencyModeFlag |
2.0.0 |
How compiler should prune files based on the provide-require dependency graph.
Default value is: NONE .User property is: closureDependencyMode . |
<closureDynamicImportAlias> |
String |
2.22.0 |
Instructs the compiler to replace dynamic import expressions with a function call using the specified name. This allows dynamic import expressions to be externally polyfilled when the output language level does not natively support them. User property is: closureDynamicImportAlias . |
<closureEmitUseStrict> |
boolean |
2.1.0 |
Start output with 'use strict'; .Default value is: true .User property is: closureEmitUseStrict . |
<closureEnvironment> |
CompilerOptions$Environment |
1.7.5 |
Determines the set of builtin externs to load.
Options: BROWSER, CUSTOM. Default value is: BROWSER .User property is: closureEnvironment . |
<closureExternDeclarations> |
ArrayList<FileSet> |
2.16.0 |
List of JavaScript files containing code that declares function names or other symbols. Use closureExterns to preserve symbols that are defined outside of the code you are compiling. The closureExterns parameter only has an effect if you are using a CompilationLevel of ADVANCED_OPTIMIZATIONS .
These file names are relative to baseSourceDir directory.
<closureExternDeclarations> <closureExternDeclaration> <includes> <include>externs/*.js</include> </includes> <excludes> <exclude>externs/doNotInclude.js</exclude> </excludes> </closureExternDeclaration> </closureExternDeclarations> User property is: closureExternDeclarations . |
<closureExterns> |
ArrayList<String> |
1.7.2 |
Deprecated. Deprecated, use closureExternDeclarations instead, it lets you specify includes and excludes.User property is: closureExterns . |
<closureExtraAnnotations> |
ArrayList<String> |
1.7.5 |
A whitelist of tag names in JSDoc. Needed to support JSDoc extensions like ngdoc. User property is: closureExtraAnnotations . |
<closureForceInjectLibs> |
ArrayList<String> |
2.1.0 |
Force injection of named runtime libraries. The format is <name> where <name> is the name of a runtime library. Possible libraries include: base , es6_runtime , runtime_type_check User property is: closureForceInjectLibs . |
<closureIncludeSourcesContent> |
boolean |
2.0.0 |
If true , include the content of the source file in the source map directly (via the sourceContent property). This makes the source file bigger, but does not require the original source file to be added to the browser dev tools.Default value is: false .User property is: closureIncludeSourcesContent . |
<closureInjectLibraries> |
boolean |
2.1.0 |
Allow injecting runtime libraries. Default value is: true .User property is: closureInjectLibraries . |
<closureIsolatePolyfills> |
boolean |
2.23.0 |
Whether to isolate polyfills from the global scope.
Polyfill isolation is an output mode that may optionally be used alongside polyfill injection. Polyfill isolation was motivated by two related issues.
Polyfill isolation mode attempts to solve these problems by "isolating" Closure polyfills and code from other code & polyfills. It is not intended to protect against malicious actors; it is instead intended to solve cases where other polyfill implementations are either buggy or (more likely) make conflicting assumptions. Default value is: false .User property is: closureIsolatePolyfills . |
<closureJsModuleRoots> |
ArrayList<String> |
2.5.0 |
Path prefixes to be removed from ES6 & CommonJS modules. User property is: closureJsModuleRoots . |
<closureLanguageIn> |
CompilerOptions$LanguageMode |
1.7.2 |
Refers to which version of ECMAScript to assume when checking for errors in your code.
Possible values are:
Default value is: ECMASCRIPT_NEXT .User property is: closureLanguageIn . |
<closureLanguageOut> |
CompilerOptions$LanguageMode |
1.7.5 |
Refers to which version of ECMAScript your code will be returned in.
It is used to transpile between different levels of ECMAScript. Possible values are
Default value is: ECMASCRIPT_2015 .User property is: closureLanguageOut . |
<closureModuleResolution> |
ModuleLoader$ResolutionMode |
2.1.0 |
Specifies how the compiler locates modules.
Default value is: BROWSER .User property is: closureModuleResolution . |
<closureOutputWrapper> |
String |
2.0.0 |
If not an empty or blank string, interpolate output into this string at the place denoted by the marker token When using this options with a source map, the map is adjusted appropriately to match the code. User property is: closureOutputWrapper . |
<closurePreferSingleQuotes> |
boolean |
2.1.0 |
Normally, when there are an equal number of single and double quotes in a string, the compiler will use double quotes. Set this to true to prefer single quotes. Default value is: false .User property is: closurePreferSingleQuotes . |
<closurePrettyPrint> |
boolean |
2.0.0 |
If true , the processed ("minified") file is pretty printed (formatted with new lines).Default value is: false .User property is: closurePrettyPrint . |
<closureProcessClosurePrimitives> |
boolean |
2.1.0 |
Processes built-ins from the Closure library, such as goog.require() , goog.provide() , and goog.exportSymbol( ) .Default value is: true .User property is: closureProcessClosurePrimitives . |
<closureProcessCommonJsModules> |
boolean |
2.1.0 |
Process CommonJS modules to a concatenable form. Default value is: false .User property is: closureProcessCommonJsModules . |
<closureRenamePrefixNamespace> |
String |
2.1.0 |
Specifies the name of an object that will be used to store all non-extern globals. User property is: closureRenamePrefixNamespace . |
<closureRenameVariablePrefix> |
String |
2.1.0 |
Specifies a prefix that will be prepended to all variables. User property is: closureRenameVariablePrefix . |
<closureRewritePolyfills> |
boolean |
2.0.0 |
If true , ES6 polyfills are written to the output file (such as for Set, Map etc.)Default value is: true .User property is: closureRewritePolyfills . |
<closureSourceMapLocationMappings> |
ArrayList<ClosureSourceMapLocationMapping> |
2.20.0 |
Source map location mapping. This is a prefix mapping from the file system path to the web server path. The source map contains a reference to the original source files; and this may be different on the web server. The location of the source file is always relative to the given sourceDir . This defines a list of replacements. For each source file, the first matching replacement is used. If the source file starts with the prefix as given by the name, it matches and is replaced with the value. For example:
<closureSourceMapLocationMappings> <closureSourceMapLocationMapping> <name>js/</name> <value>/web/www/js</value> </closureSourceMapLocationMapping> </closureSourceMapLocationMappings> js/file1.js and js/file2.js . The above replaces them with /web/www/js/file1.js and /web/www/js/file2.js . This is then path that will be used in the source map to reference the original source file. If no location mappings are specified, the path of the source files relative to the created source map is used instead. If you set the name to an empty string, it matches all paths.User property is: closureSourceMapLocationMappings . |
<closureSourceMapName> |
String |
2.0.0 |
Name of the source map, if one is created. This is interpreted as a relative path to where the processed JavaScript file is written to. By default, the extension .map is added to the minified file. Variables are specified via #{variableName} . To insert a literal # , use ## . The following variables are available:
Default value is: #{filename}.map .User property is: closureSourceMapName . |
<closureSourceMapOutputType> |
SourceMapOutputType |
2.0.0 |
After creating the source map, the browser needs to find it. There are several options available:
Default value is: reference .User property is: closureSourceMapOutputType . |
<closureStrictModeInput> |
boolean |
2.1.0 |
Assume input sources are to run in strict mode. Default value is: true .User property is: closureStrictModeInput . |
<closureTrustedStrings> |
boolean |
2.0.0 |
If false , converts some characters such as '<' and '>' to '\x3c' and '\x3d' so that they are safe to put inside a script tag in an HTML file.Default value is: true .User property is: closureTrustedStrings . |
<closureUseTypesForOptimization> |
boolean |
2.1.0 |
Enable or disable the optimizations based on available type information. Inaccurate type annotations may result in incorrect results. Default value is: false .User property is: closureUseTypesForOptimization . |
<closureWarningLevel> |
WarningLevel |
2.1.0 |
Specifies the warning level to use: QUIET , DEFAULT , or VERBOSE . You can override specific warnings via closureWarningLevels .Default value is: DEFAULT .User property is: closureWarningLevel . |
<closureWarningLevels> |
HashMap<String,String> |
1.7.5 |
Treat certain warnings as the specified CheckLevel:
User property is: closureWarningLevels . |
<encoding> |
String |
1.3.2 |
If a supported character set is specified, it will be used to read the input file. Otherwise, it will assume that the platform's default character set is being used. The output file is encoded using the same character set.
See the IANA Charset Registry for a list of valid encoding types. Default value is: ${project.build.sourceEncoding} .User property is: encoding .Alias is: charset . |
<excludes> |
ArrayList<String> |
1.2 |
JavaScript files to exclude. Specified as fileset patterns which are relative to the JavaScript source directory. User property is: excludes . |
<force> |
boolean |
2.0.0 |
For each bundle, this plugin performs a check whether the input or output files have changed and skips the execution in case they haven't. Set this flag to true to force the execution.Default value is: false .User property is: force . |
<includes> |
ArrayList<String> |
1.2 |
JavaScript files to include. Specified as fileset patterns which are relative to the JavaScript source directory. User property is: includes . |
<lineSeparator> |
String |
2.0.0 |
The line separator to be used when merging files etc. Defaults to the default system line separator. Special characters are entered escaped. So for example, to use a new line feed as the separator, set this property to \n (two characters, a backslash and the letter n).User property is: lineSeparator . |
<logLevel> |
LogLevel |
- |
By default, messages are logged at the log level set by maven. This option allows you to change the log level. Valid options are all , debug , info , warn , error , none . Leave empty to use the default log level. Please note that you can only decrease, not increase, the log level.User property is: logLevel . |
<outputFilename> |
String |
2.0.0 |
The output file name of the processed files. This is interpreted as a path relative to the targetDir .
Variables are specified via
If merging files, by default the basename is set to Default value is: #{path}/#{basename}.min.#{extension} .User property is: outputFilename . |
<skip> |
boolean |
2.7.0 |
When set to `true`, the plugin exits immediately without doing any work at all. Default value is: false .User property is: skip . |
<skipMerge> |
boolean |
1.5.2 |
Skip the merge step. Minification will be applied to each source file individually. Default value is: false .User property is: skipMerge . |
<skipMinify> |
boolean |
1.5.2 |
Skip the minify step. Useful when merging files that are already minified. Default value is: false .User property is: skipMinify . |
<skipMode> |
SkipMode |
2.9.0 |
This options lets configure how this plugin checks whether it should skip an execution in case the target file exists already. Usually you do not want to spend unneccesary processing time on transpiling JavaScript files when the input files themeselves have not changed. Available options are:
force is set to false . In case you never want to skip execution, set the the option force to true .Default value is: NEWER .User property is: skipMode . |
<skipRunOnIncremental> |
boolean |
- |
When this plugin is executed as part of an m2e incremental build and this option is set to For the m2e integration, this plugin is configured by default to run on incremental builds. When having a project opened in Eclipse, this recreates the minified files every time a source file is changed. You can disable this behavior via the org.eclipse.m2e/lifefycle-mapping plugin. As this is rather verbose, this option offers a convenient way of disabling incremental builds. Please note that tecnically this plugin is still executed on every incremental build cycle, but exits immediately without doing any work. Default value is: false .User property is: skipRunOnIncremental . |
<sourceDir> |
String |
- |
JavaScript source directory. This is relative to the baseSourceDir .Default value is: js .User property is: sourceDir . |
<targetDir> |
String |
1.3.2 |
JavaScript target directory. Takes the same value as jsSourceDir when empty. This is relative to the baseTargetDir .Default value is: js .User property is: targetDir . |
true
. Defaults to false
.
Note: When enabling this option, you might also want to set skipMerge
to true
and the outputFilename
to #{path}/#{basename}.#{extension}
.
boolean
No
allowReplacingInputFiles
false
basedir
to make it relative to the current directory.java.io.File
No
baseSourceDir
${basedir}/src/main/webapp
project.build.directory
to make it relative to the current directory.java.io.File
No
baseTargetDir
${project.build.directory}/${project.build.finalName}
int
No
bufferSize
4096
java.lang.String
1.7.5
No
bundleConfiguration
import('./path')
to pass through the compiler unchanged. Enabling this requires setting closureLanguageOut
to at least ECMASCRIPT_2020
.boolean
2.21.0
No
closureAllowDynamicImport
false
$inject
properties for AngularJS for functions annotated with @ngInject
.boolean
1.7.3
No
closureAngularPass
false
boolean
2.1
No
closureAssumeFunctionWrapper
false
closureOutputWrapper
flag for script isolation and the closureRenamePrefixNamespace
flag so that symbols can be referenced across chunks.import
and export
statements. Since modules have built in isolation and modern browsers know how to load them, this option is by far the easiest.com.google.javascript.jscomp.CompilerOptions$ChunkOutputType
2.27.0
No
closureChunkOutputType
GLOBAL_NAMESPACE
boolean
2.0.0
No
closureColorizeErrorOutput
true
WHITESPACE_ONLY
: Just removes whitespace and comments from your JavaScript.SIMPLE_OPTIMIZATIONS
: Performs compression and optimization that does not interfere with the interaction between the compiled JavaScript and other JavaScript. This level renames only local variables.ADVANCED_OPTIMIZATIONS
: Achieves the highest level of compression by renaming symbols in your JavaScript. When using ADVANCED_OPTIMIZATIONS
compilation you must perform extra steps to preserve references to external symbols. See Advanced Compilation and Externs for more information about ADVANCED_OPTIMIZATIONS
.BUNDLE
: Leaves all compiler options unchanged. For advanced usage if you want to seet the releavant options yourself.com.google.javascript.jscomp.CompilationLevel
1.7.2
No
closureCompilationLevel
SIMPLE_OPTIMIZATIONS
boolean
2.1.0
No
closureCreateSourceMap
false
boolean
2.1.0
No
closureDebug
false
@define
.
<define>
<name>value</name>
</define>
<name>
is the name of a @define
variable and value
is a JavaScript boolean, number or string literal. That is, use quotation marks to specify a string: "First line\nseconds line"
java.util.HashMap<java.lang.String, java.lang.String>
1.7.5
No
closureDefineReplacements
When you use closureDependencyMode
PRUNE or PRUNE_LEGACY, you must specify to the compiler what the entry points of your application are. Beginning at those entry points, it will trace through the files to discover what sources are actually referenced and will drop all other files.
Adds a collection of symbols to always keep. In dependency pruning mode, we will automatically keep all the transitive dependencies of these symbols. The syntactic form of a symbol depends on the type of dependency primitives we're using. For example, goog.provide('foo.bar')
provides the symbol foo.bar
. Entry points can be scoped to a module by specifying mod2:foo.bar
.
There are two different types of entry points, closures and modules:
closure
: A closure namespace used as an entry point. May start with goog:
when provided as a flag from the command line. Closure entry points may also be formatted as: goog:moduleName:name.space
which specifies that the module name and provided namespace are differentfile
: Must start with the prefix file:
. AES6 or CommonJS modules used as an entry point. The file path is relative to the sourceDir
.java.util.ArrayList<java.lang.String>
2.0.0
No
closureDependencyEntryPoints
NONE
All input files will be included in the compilation in the order they were specified in.SORT_ONLY
All input files will be included in the compilation in dependency order.PRUNE
Input files that are transitive dependencies of the entry points will be included in the compilation in dependency order. All other input files will be dropped. All entry points must be explicitly defined.PRUNE_LEGACY
(deprecated) Input files that are transitive dependencies of the entry points will be included in the compilation in dependency order. All other input files will be dropped. In addition to the explicitly defined entry points, moochers (files not explicitly defining a module) are implicit entry points.com.github.blutorange.maven.plugin.closurecompiler.common.DependencyModeFlag
2.0.0
No
closureDependencyMode
NONE
java.lang.String
2.22.0
No
closureDynamicImportAlias
'use strict';
.boolean
2.1.0
No
closureEmitUseStrict
true
com.google.javascript.jscomp.CompilerOptions$Environment
1.7.5
No
closureEnvironment
BROWSER
closureExterns
to preserve symbols that are defined outside of the code you are compiling. The closureExterns
parameter only has an effect if you are using a CompilationLevel
of ADVANCED_OPTIMIZATIONS
.
baseSourceDir
directory.
<closureExternDeclarations> <closureExternDeclaration> <includes> <include>externs/*.js</include> </includes> <excludes> <exclude>externs/doNotInclude.js</exclude> </excludes> </closureExternDeclaration> </closureExternDeclarations>
java.util.ArrayList<com.github.blutorange.maven.plugin.closurecompiler.plugin.FileSet>
2.16.0
No
closureExternDeclarations
closureExternDeclarations
instead, it lets you specify includes and excludes.java.util.ArrayList<java.lang.String>
1.7.2
No
closureExterns
java.util.ArrayList<java.lang.String>
1.7.5
No
closureExtraAnnotations
base
, es6_runtime
, runtime_type_check
java.util.ArrayList<java.lang.String>
2.1.0
No
closureForceInjectLibs
true
, include the content of the source file in the source map directly (via the sourceContent
property). This makes the source file bigger, but does not require the original source file to be added to the browser dev tools.boolean
2.0.0
No
closureIncludeSourcesContent
false
boolean
2.1.0
No
closureInjectLibraries
true
Polyfill isolation is an output mode that may optionally be used alongside polyfill injection.
Polyfill isolation was motivated by two related issues.
Polyfill isolation mode attempts to solve these problems by "isolating" Closure polyfills and code from other code & polyfills. It is not intended to protect against malicious actors; it is instead intended to solve cases where other polyfill implementations are either buggy or (more likely) make conflicting assumptions.
boolean
2.23.0
No
closureIsolatePolyfills
false
java.util.ArrayList<java.lang.String>
2.5.0
No
closureJsModuleRoots
ECMASCRIPT3
: Checks code assuming ECMAScript 3 compliance, and gives errors for code using features only present in later versions of ECMAScript.ECMASCRIPT5
: Checks code assuming ECMAScript 5 compliance, allowing new features not present in ECMAScript 3, and gives errors for code using features only present in later versions of ECMAScript.ECMASCRIPT5_STRICT
: Like ECMASCRIPT5
but assumes compliance with strict mode ('use strict';
).ECMASCRIPT_2015
: Checks code assuming ECMAScript 2015 compliance.ECMASCRIPT_2016
: Checks code assuming ECMAScript 2016 compliance.ECMASCRIPT_2017
: Checks code assuming ECMAScript 2017 compliance.ECMASCRIPT_2018
: Checks code assuming ECMAScript 2018 compliance.ECMASCRIPT_2019
: Checks code assuming ECMAScript 2019 compliance.ECMASCRIPT_2020
: Checks code assuming ECMAScript 2020 compliance.ECMASCRIPT_2021
: Checks code assuming ECMAScript 2021 compliance.ECMASCRIPT_NEXT
: Checks code assuming ECMAScript latest draft standard.STABLE
Use stable featurescom.google.javascript.jscomp.CompilerOptions$LanguageMode
1.7.2
No
closureLanguageIn
ECMASCRIPT_NEXT
ECMASCRIPT3
: Outputs code with ECMAScript 3 compliance.ECMASCRIPT5
: Outputs code with ECMAScript 2015.ECMASCRIPT5_STRICT
: Like ECMASCRIPT5
but assumes compliance with strict mode ('use strict';
).ECMASCRIPT_2015
: Outputs code with ECMAScript 2015.ECMASCRIPT_2016
: Outputs code with ECMAScript 2016.ECMASCRIPT_2017
: Outputs code with ECMAScript 2017.ECMASCRIPT_2018
: Outputs code with ECMAScript 2018.ECMASCRIPT_2019
: Outputs code with ECMAScript 2019.STABLE
: Use stable featuresNO_TRANSPILE
: Do not perform any transpilation.com.google.javascript.jscomp.CompilerOptions$LanguageMode
1.7.5
No
closureLanguageOut
ECMASCRIPT_2015
BROWSER
: Requires all module imports to begin with a '.' or '/' and have a file extension. Mimics the behavior of MS Edge.BROWSER_WITH_TRANSFORMED_PREFIXES
: A limited superset of BROWSER
that transforms some path prefixes. For example, one could configure this so that "@root/" is replaced with "/my/path/to/project/" within import paths.NODE
: Uses the node module rules. Modules which do not begin with a "." or "/" character are looked up from the appropriate node_modules folder. Includes the ability to require directories and JSON files. Exact match, then ".js", then ".json" file extensions are searched.WEBPACK
: Looks up modules from a special lookup map. Uses a lookup map provided by webpack to locate modules from a numeric id used during import.com.google.javascript.jscomp.deps.ModuleLoader$ResolutionMode
2.1.0
No
closureModuleResolution
BROWSER
If not an empty or blank string, interpolate output into this string at the place denoted by the marker token %output%
. Use marker token %output|jsstring%
to do js string escaping on the output.
When using this options with a source map, the map is adjusted appropriately to match the code.
java.lang.String
2.0.0
No
closureOutputWrapper
boolean
2.1.0
No
closurePreferSingleQuotes
false
true
, the processed ("minified") file is pretty printed (formatted with new lines).boolean
2.0.0
No
closurePrettyPrint
false
goog.require()
, goog.provide()
, and goog.exportSymbol( )
.boolean
2.1.0
No
closureProcessClosurePrimitives
true
boolean
2.1.0
No
closureProcessCommonJsModules
false
java.lang.String
2.1.0
No
closureRenamePrefixNamespace
java.lang.String
2.1.0
No
closureRenameVariablePrefix
true
, ES6 polyfills are written to the output file (such as for Set, Map etc.)boolean
2.0.0
No
closureRewritePolyfills
true
sourceDir
. This defines a list of replacements. For each source file, the first matching replacement is used. If the source file starts with the prefix as given by the name, it matches and is replaced with the value. For example:
<closureSourceMapLocationMappings> <closureSourceMapLocationMapping> <name>js/</name> <value>/web/www/js</value> </closureSourceMapLocationMapping> </closureSourceMapLocationMappings>
js/file1.js
and js/file2.js
. The above replaces them with /web/www/js/file1.js
and /web/www/js/file2.js
. This is then path that will be used in the source map to reference the original source file. If no location mappings are specified, the path of the source files relative to the created source map is used instead. If you set the name to an empty string, it matches all paths.java.util.ArrayList<com.github.blutorange.maven.plugin.closurecompiler.plugin.ClosureSourceMapLocationMapping>
2.20.0
No
closureSourceMapLocationMappings
.map
is added to the minified file. Variables are specified via #{variableName}
. To insert a literal #
, use ##
. The following variables are available:
filename
is replaced with the name of the minified fileextension
is replaced with the extension of the filebasename
is replaced with the basename (name without the extension) of the file.java.lang.String
2.0.0
No
closureSourceMapName
#{filename}.map
reference
(the default): Create a source map named [originalFile].map, and add a reference to it in the minified file.file
: Just create a source map named [originalFile].map, do not add a reference in the minified file. This may be useful when you want to add the Source-Map
HTTP header.inline
: Do not write a separate source map file, but instead include the source map content in the minified file (as base64). This makes it easier for the browser to find the source map. Especially useful when used with JSF/Primefaces or other frameworks that do not use standard URLs.com.github.blutorange.maven.plugin.closurecompiler.common.SourceMapOutputType
2.0.0
No
closureSourceMapOutputType
reference
boolean
2.1.0
No
closureStrictModeInput
true
false
, converts some characters such as '<' and '>' to '\x3c' and '\x3d' so that they are safe to put inside a script tag in an HTML file.boolean
2.0.0
No
closureTrustedStrings
true
boolean
2.1.0
No
closureUseTypesForOptimization
false
QUIET
, DEFAULT
, or VERBOSE
. You can override specific warnings via closureWarningLevels
.com.google.javascript.jscomp.WarningLevel
2.1.0
No
closureWarningLevel
DEFAULT
ERROR
: Makes all warnings of the given group to build-breaking error.WARNING
: Makes all warnings of the given group a non-breaking warning.OFF
: Silences all warnings of the given group.
<closureWarningLevels>
<nonStandardJsDocs>OFF</nonStandardJsDocs>
</closureWarningLevels>
java.util.HashMap<java.lang.String, java.lang.String>
1.7.5
No
closureWarningLevels
java.lang.String
1.3.2
No
encoding
${project.build.sourceEncoding}
charset
java.util.ArrayList<java.lang.String>
1.2
No
excludes
true
to force the execution.boolean
2.0.0
No
force
false
java.util.ArrayList<java.lang.String>
1.2
No
includes
\n
(two characters, a backslash and the letter n).java.lang.String
2.0.0
No
lineSeparator
all
, debug
, info
, warn
, error
, none
. Leave empty to use the default log level. Please note that you can only decrease, not increase, the log level.com.github.blutorange.maven.plugin.closurecompiler.common.LogLevel
No
logLevel
targetDir
.
Variables are specified via #{variableName}
. To insert a literal #
, use ##
. The following variables are supported:
filename
is replaced with the name of the minified file.extension
is replaced with the extension of the file (without the period)basename
is replaced with the basename (name without the extension) of the file.skipMerge
is activated): The variable path
is replaced with the path of the current file, relative to the sourceDir
.If merging files, by default the basename is set to script
and the extension to js
, so that the resulting merged file is called script.min.js
.
java.lang.String
2.0.0
No
outputFilename
#{path}/#{basename}.min.#{extension}
boolean
2.7.0
No
skip
false
boolean
1.5.2
No
skipMerge
false
boolean
1.5.2
No
skipMinify
false
force
is set to false
. In case you never want to skip execution, set the the option force
to true
.com.github.blutorange.maven.plugin.closurecompiler.plugin.SkipMode
2.9.0
No
skipMode
NEWER
When this plugin is executed as part of an m2e incremental build and this option is set to true
, skip the execution of this plugin.
For the m2e integration, this plugin is configured by default to run on incremental builds. When having a project opened in Eclipse, this recreates the minified files every time a source file is changed.
You can disable this behavior via the org.eclipse.m2e/lifefycle-mapping plugin. As this is rather verbose, this option offers a convenient way of disabling incremental builds. Please note that tecnically this plugin is still executed on every incremental build cycle, but exits immediately without doing any work.
boolean
No
skipRunOnIncremental
false
baseSourceDir
.java.lang.String
No
sourceDir
js
jsSourceDir
when empty. This is relative to the baseTargetDir
.java.lang.String
1.3.2
No
targetDir
js