Maven Javascript Compiler Plugin
Forked from mdasberg/maven-closure-compiler-plugin, with additions from blizzy78/maven-closure-compiler-plugin.
Usage Add the following to your maven build plugins.
<plugin>
<groupId>nz.co.aetheric.maven</groupId>
<artifactId>plugin-compiler-javascript</artifactId>
<version>1.1.0</version>
<configuration>
<compilation_level>SIMPLE_OPTIMIZATIONS</compilation_level>
<recursive>true</recursive>
<suffix>.min.js</suffix>
<srcDir>${project.basedir}/src/main/javascript</srcDir>
<outDir>${project.build.outputDirectory}/META-INF/resources/script</outDir>
<appendVersion>true</appendVersion>
<version>1.0.0</version>
</configuration>
</plugin>
As you can see there are 4 parameters to the operation, all of which are optional:
-
compilation_level is a optional parameter which uses ADVANCED_OPTIMIZATIONS as default.
-
recursive is whether the file scanner should follow down directories.
-
suffix is what gets put at the end of the compiled filename.
-
srcDir is the location of the uncompiled files.
-
outDir is the location where the compiled files are put.
-
appendVersion is whether to append the specified version to each output file.
-
version is used to add a version number to the compiled files.