gwt:mergewebxml

Full name:

org.codehaus.mojo:gwt-maven-plugin:1.1:mergewebxml

Description:

Merges GWT servlet elements into deployment descriptor (and non GWT servlets into shell).

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Binds by default to the lifecycle phase: process-resources.

Required Parameters

Name Type Since Description
generateDirectory File - Folder where generated-source will be created (automatically added to compile classpath). Default value is: ${project.build.directory}/generated-sources/gwt.
webXml File - Source web.xml deployment descriptor that is used for GWT shell and for deployment WAR to "merge" servlet entries. Default value is: ${basedir}/src/main/webapp/WEB-INF/web.xml.

Optional Parameters

Name Type Since Description
buildDir File - Deprecated. use mergedWebXml
extraArgs String - Deprecated. use extraJvmArgs
extraJvmArgs String - Extra JVM arguments that are passed to the GWT-Maven generated scripts (for compiler, shell, etc - typically use -Xmx512m here, or -XstartOnFirstThread, etc).

Can be set from command line using '-Dgwt.extraJvmArgs=...', defaults to setting max Heap size to be large enough for most GWT use cases.

Default value is: -Xmx512m.
gen File - Location on filesystem where GWT will write generated content for review (-gen option to GWTCompiler).

Can be set from command line using '-Dgwt.gen=...'

Default value is: ${project.build.directory}/.generated.
gwtHome File - Location on filesystem where GWT is installed - for manual mode (existing GWT on machine). Setting this parameter will disable gwtVersion.
gwtVersion String - GWT version used to build dependency paths, should match the "version" in the Maven repo. If not set, will be autodetected from project com.google.gwt:gwt-user dependency
inplace boolean - Select the place where GWT application is built. In inplace mode, the warSourceDirectory is used to match the same use case of the war plugin. Default value is: false.
jvm String 1.1 Option to specify the jvm (or path to the java executable) to use with the forking scripts. For the default, the jvm will be the same as the one used to run Maven.
logLevel String - GWT logging level (-logLevel ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL).

Can be set from command line using '-Dgwt.logLevel=...'

Default value is: INFO.
mergedWebXml File - Location on filesystem where merged web.xml will be created. The maven-war-plugin must be configured to use this path as webXml parameter
module String - A single GWT module. Shortcut for <modules> or option to specify a single module from command line
modules String[] - The project GWT modules. If not set, the plugin will scan the project for .gwt.xml files.
style String - GWT JavaScript compiler output style (-style OBF[USCATED], PRETTY, or DETAILED).

Can be set from command line using '-Dgwt.style=...'

Default value is: OBF.
timeOut int - Forked process execution timeOut. Usefull to avoid maven to hang in continuous integration server.
warSourceDirectory File - Location of the web application static resources (same as maven-war-plugin parameter) Default value is: ${basedir}/src/main/webapp.
webXmlServletPathAsIs boolean - Specifies whether or not to add the module name as a prefix to the servlet path when merging web.xml. If you set this to false the exact path from the GWT module will be used, nothing else will be prepended. Default value is: false.
webappDirectory File - Location on filesystem where GWT will write output files (-out option to GWTCompiler). Default value is: ${project.build.directory}/${project.build.finalName}.

Parameter Details

buildDir:

Deprecated. use mergedWebXml
Location on filesystem where project should be built.
  • Type: java.io.File
  • Required: No
  • Expression: ${project.build.directory}

extraArgs:

Deprecated. use extraJvmArgs
For backward compatibility with googlecode gwt-maven, support the command line argument '-Dgoogle.webtoolkit.extrajvmargs=...'.
  • Type: java.lang.String
  • Required: No
  • Expression: ${google.webtoolkit.extrajvmargs}

extraJvmArgs:

Extra JVM arguments that are passed to the GWT-Maven generated scripts (for compiler, shell, etc - typically use -Xmx512m here, or -XstartOnFirstThread, etc).

Can be set from command line using '-Dgwt.extraJvmArgs=...', defaults to setting max Heap size to be large enough for most GWT use cases.

  • Type: java.lang.String
  • Required: No
  • Expression: ${gwt.extraJvmArgs}
  • Default: -Xmx512m

gen:

Location on filesystem where GWT will write generated content for review (-gen option to GWTCompiler).

Can be set from command line using '-Dgwt.gen=...'

  • Type: java.io.File
  • Required: No
  • Expression: ${gwt.gen}
  • Default: ${project.build.directory}/.generated

generateDirectory:

Folder where generated-source will be created (automatically added to compile classpath).
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/generated-sources/gwt

gwtHome:

Location on filesystem where GWT is installed - for manual mode (existing GWT on machine). Setting this parameter will disable gwtVersion.
  • Type: java.io.File
  • Required: No
  • Expression: ${google.webtoolkit.home}

gwtVersion:

GWT version used to build dependency paths, should match the "version" in the Maven repo. If not set, will be autodetected from project com.google.gwt:gwt-user dependency
  • Type: java.lang.String
  • Required: No

inplace:

Select the place where GWT application is built. In inplace mode, the warSourceDirectory is used to match the same use case of the war plugin.
  • Type: boolean
  • Required: No
  • Expression: ${gwt.inplace}
  • Default: false

jvm:

Option to specify the jvm (or path to the java executable) to use with the forking scripts. For the default, the jvm will be the same as the one used to run Maven.
  • Type: java.lang.String
  • Since: 1.1
  • Required: No
  • Expression: ${gwt.jvm}

logLevel:

GWT logging level (-logLevel ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL).

Can be set from command line using '-Dgwt.logLevel=...'

  • Type: java.lang.String
  • Required: No
  • Expression: ${gwt.logLevel}
  • Default: INFO

mergedWebXml:

Location on filesystem where merged web.xml will be created. The maven-war-plugin must be configured to use this path as webXml parameter
  • Type: java.io.File
  • Required: No
  • Expression: ${project.build.directory}/web.xml

module:

A single GWT module. Shortcut for <modules> or option to specify a single module from command line
  • Type: java.lang.String
  • Required: No
  • Expression: ${gwt.module}

modules:

The project GWT modules. If not set, the plugin will scan the project for .gwt.xml files.
  • Type: java.lang.String[]
  • Required: No

style:

GWT JavaScript compiler output style (-style OBF[USCATED], PRETTY, or DETAILED).

Can be set from command line using '-Dgwt.style=...'

  • Type: java.lang.String
  • Required: No
  • Expression: ${gwt.style}
  • Default: OBF

timeOut:

Forked process execution timeOut. Usefull to avoid maven to hang in continuous integration server.
  • Type: int
  • Required: No

warSourceDirectory:

Location of the web application static resources (same as maven-war-plugin parameter)
  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/src/main/webapp

webXml:

Source web.xml deployment descriptor that is used for GWT shell and for deployment WAR to "merge" servlet entries.
  • Type: java.io.File
  • Required: Yes
  • Default: ${basedir}/src/main/webapp/WEB-INF/web.xml

webXmlServletPathAsIs:

Specifies whether or not to add the module name as a prefix to the servlet path when merging web.xml. If you set this to false the exact path from the GWT module will be used, nothing else will be prepended.
  • Type: boolean
  • Required: No
  • Default: false

webappDirectory:

Location on filesystem where GWT will write output files (-out option to GWTCompiler).
  • Type: java.io.File
  • Required: No
  • Expression: ${gwt.war}
  • Default: ${project.build.directory}/${project.build.finalName}