Fork me on GitHub

gwt:generate-module

Full name:

net.ltgt.gwt.maven:gwt-maven-plugin:1.0.1:generate-module

Description:

Generates a GWT module definition from Maven dependencies, or merge <inherits/> with a module template.

When no module template exist, the behavior is identical to using an empty file.

META-INF/gwt/mainModule files from the project dependencies (not transitive) are used to generate <inherits/> directives. Those directives are inserted at the very beginning of the generated module (notably, they'll appear before any existing <inherits/> directive in the module template).

If moduleShortName is specified (and not empty), it overwrites any existing rename-to from the module template.

Unless the module template contains a source folder (either <source/> or <super-source/>, those three lines will be inserted at the very end of the generated module (this is to keep any includes or excludes or specific path from the module template):


<source path="client"/>
<source path="shared"/>
<super-source path="super"/>

Attributes:

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

Required Parameters

Name Type Since Description
<outputDirectory> File - The directory where the GWT module descriptor will be generated.
Default value is: ${project.build.outputDirectory}.

Optional Parameters

Name Type Since Description
<generateInheritsFromDependencies> boolean - A flag to enable generation of <inherits/> from META-INF/gwt/mainModule files in dependencies.
Default value is: true.
<moduleName> String - The module to generate.
<moduleShortName> String - The short name of the module, used to name the output .nocache.js file.
<moduleTemplate> File - Module definition to merge with.
Default value is: ${project.basedir}/src/main/module.gwt.xml.
<skipModule> boolean - A flag to disable generation of the GWT module in favor of a hand-authored module descriptor.
Default value is: false.

Parameter Details

<generateInheritsFromDependencies>

A flag to enable generation of <inherits/> from META-INF/gwt/mainModule files in dependencies.
  • Type: boolean
  • Required: No
  • Default: true

<moduleName>

The module to generate.
  • Type: java.lang.String
  • Required: No

<moduleShortName>

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

<moduleTemplate>

Module definition to merge with.
  • Type: java.io.File
  • Required: No
  • Default: ${project.basedir}/src/main/module.gwt.xml

<outputDirectory>

The directory where the GWT module descriptor will be generated.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.outputDirectory}

<skipModule>

A flag to disable generation of the GWT module in favor of a hand-authored module descriptor.
  • Type: boolean
  • Required: No
  • Default: false