Maven Javascript Compiler Plugin

The organisation-level parent for all Aetheric Engineering modules.

License

License

Categories

Categories

JavaScript Languages Maven Build Tools
GroupId

GroupId

nz.co.aetheric.maven
ArtifactId

ArtifactId

plugin-compiler-javascript
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Maven Javascript Compiler Plugin
The organisation-level parent for all Aetheric Engineering modules.
Project URL

Project URL

https://github.com/aetheric/maven-plugin-compiler-javascript
Source Code Management

Source Code Management

https://github.com/aetheric/maven-plugin-compiler-javascript.git

Download plugin-compiler-javascript

How to add to project

<plugin>
    <groupId>nz.co.aetheric.maven</groupId>
    <artifactId>plugin-compiler-javascript</artifactId>
    <version>1.1.0</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.2.1
org.apache.maven : maven-plugin-api jar 3.2.1
com.google.javascript : closure-compiler jar v20140508

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.3

test (1)

Group / Artifact Type Version
org.apache.maven.shared : maven-plugin-testing-harness jar 1.1

Project Modules

There are no modules declared in this project.

Maven Javascript 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:

  1. compilation_level is a optional parameter which uses ADVANCED_OPTIMIZATIONS as default.

  2. recursive is whether the file scanner should follow down directories.

  3. suffix is what gets put at the end of the compiled filename.

  4. srcDir is the location of the uncompiled files.

  5. outDir is the location where the compiled files are put.

  6. appendVersion is whether to append the specified version to each output file.

  7. version is used to add a version number to the compiled files.

nz.co.aetheric.maven

Aetheric Engineering

Versions

Version
1.1.0