Fork me on GitHub

gwt:compile

Full name:

net.ltgt.gwt.maven:gwt-maven-plugin:1.0.1:compile

Description:

Invokes the GWT Compiler on the project's sources and resources.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: prepare-package.

Required Parameters

Name Type Since Description
<deploy> File - The directory into which deployable but not servable output files will be written.
Default value is: ${project.build.directory}/gwt/deploy.
<moduleName> String - Name of the module to compile.
<webappDirectory> File - Specifies the location of the target war directory.
Default value is: ${project.build.directory}/${project.build.finalName}.
<workDir> File - The compiler work directory (must be writeable).
Default value is: ${project.build.directory}/gwt/work.

Optional Parameters

Name Type Since Description
<compilerArgs> List - Additional arguments to be passed to the GWT compiler.
<draftCompile> boolean - Enable faster, but less-optimized, compilations.
Default value is: false.
User property is: gwt.draftCompile.
<extra> File - The directory into which extra files, not intended for deployment, will be written.
<failOnError> Boolean - Only succeed if no input files have errors.
User property is: gwt.failOnError.
<forceCompilation> boolean - Require the GWT plugin to compile the GWT module even if none of the sources appear to have changed. By default, this plugin looks to see if the output *.nocache.js exists and inputs (POM, sources and dependencies) have not changed.
Default value is: false.
User property is: gwt.forceCompilation.
<jdkToolchain> Map - Requirements for this jdk toolchain, if jvm is not set.

This overrides the toolchain selected by the maven-toolchains-plugin.


<jvm> String - Path to the Java executable to use. By default, will use the configured toolchain, or fallback to the same JVM as the one used to run Maven.
<jvmArgs> List - Arguments to be passed to the forked JVM (e.g. -Xmx)
<localWorkers> String - The number of local workers to use when compiling permutations. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point values are only accepted together with "C".
User property is: gwt.localWorkers.
<logLevel> String - Sets the level of logging detail.
User property is: gwt.logLevel.
<moduleShortName> String - The short name of the module, used to name the output .nocache.js file.
<optimize> Integer - Sets the optimization level used by the compiler. 0=none 9=maximum.
User property is: gwt.optimize.
<skipCompilation> boolean - Require the GWT plugin to skip compilation. This can be useful to quickly package an incomplete or stale application that's used as a dependency (an overlay generally) in a war, for example to launch that war in a container and then launch DevMode for this GWT application.
Default value is: false.
User property is: gwt.skipCompilation.
<sourceLevel> String - Specifies Java source level.
User property is: maven.compiler.source.
<staleMillis> int - Sets the granularity in milliseconds of the last modification date for testing whether the module needs recompilation.
Default value is: 0.
User property is: lastModGranularityMs.
<style> String - Script output style: OBFUSCATED, PRETTY, or DETAILED.
User property is: gwt.style.
<systemProperties> Map - List of system properties to pass to the GWT compiler.

Parameter Details

<compilerArgs>

Additional arguments to be passed to the GWT compiler.
  • Type: java.util.List
  • Required: No

<deploy>

The directory into which deployable but not servable output files will be written.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/gwt/deploy

<draftCompile>

Enable faster, but less-optimized, compilations.
  • Type: boolean
  • Required: No
  • User Property: gwt.draftCompile
  • Default: false

<extra>

The directory into which extra files, not intended for deployment, will be written.
  • Type: java.io.File
  • Required: No

<failOnError>

Only succeed if no input files have errors.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: gwt.failOnError

<forceCompilation>

Require the GWT plugin to compile the GWT module even if none of the sources appear to have changed. By default, this plugin looks to see if the output *.nocache.js exists and inputs (POM, sources and dependencies) have not changed.
  • Type: boolean
  • Required: No
  • User Property: gwt.forceCompilation
  • Default: false

<jdkToolchain>

Requirements for this jdk toolchain, if jvm is not set.

This overrides the toolchain selected by the maven-toolchains-plugin.

  • Type: java.util.Map
  • Required: No

<jvm>

Path to the Java executable to use. By default, will use the configured toolchain, or fallback to the same JVM as the one used to run Maven.
  • Type: java.lang.String
  • Required: No

<jvmArgs>

Arguments to be passed to the forked JVM (e.g. -Xmx)
  • Type: java.util.List
  • Required: No

<localWorkers>

The number of local workers to use when compiling permutations. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point values are only accepted together with "C".
  • Type: java.lang.String
  • Required: No
  • User Property: gwt.localWorkers

<logLevel>

Sets the level of logging detail.
  • Type: java.lang.String
  • Required: No
  • User Property: gwt.logLevel

<moduleName>

Name of the module to compile.
  • Type: java.lang.String
  • Required: Yes

<moduleShortName>

The short name of the module, used to name the output .nocache.js file.
  • Type: java.lang.String
  • Required: No

<optimize>

Sets the optimization level used by the compiler. 0=none 9=maximum.
  • Type: java.lang.Integer
  • Required: No
  • User Property: gwt.optimize

<skipCompilation>

Require the GWT plugin to skip compilation. This can be useful to quickly package an incomplete or stale application that's used as a dependency (an overlay generally) in a war, for example to launch that war in a container and then launch DevMode for this GWT application.
  • Type: boolean
  • Required: No
  • User Property: gwt.skipCompilation
  • Default: false

<sourceLevel>

Specifies Java source level.
  • Type: java.lang.String
  • Required: No
  • User Property: maven.compiler.source

<staleMillis>

Sets the granularity in milliseconds of the last modification date for testing whether the module needs recompilation.
  • Type: int
  • Required: No
  • User Property: lastModGranularityMs
  • Default: 0

<style>

Script output style: OBFUSCATED, PRETTY, or DETAILED.
  • Type: java.lang.String
  • Required: No
  • User Property: gwt.style

<systemProperties>

List of system properties to pass to the GWT compiler.
  • Type: java.util.Map
  • Required: No

<webappDirectory>

Specifies the location of the target war directory.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/${project.build.finalName}

<workDir>

The compiler work directory (must be writeable).
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/gwt/work