gwt:debug

Full name:

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

Description:

Extends the gwt goal and runs the project in the GWT Hosted mode with a debugger port hook (optionally suspended).

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Invokes the execution of the lifecycle phase compile prior to executing itself.

Required Parameters

Name Type Since Description
buildOutputDirectory File - Location of the compiled classes. Default value is: ${project.build.outputDirectory}.
generateDirectory File - Folder where generated-source will be created (automatically added to compile classpath). Default value is: ${project.build.directory}/generated-sources/gwt.
runTarget String - URL that should be automatically opened in the GWT shell. For example com.myapp.gwt.Module/Module.html.

When the host page is outside the module "public" folder (for example, at webapp root), the module MUST be specified (using a single <module> in configuration or by setting -Dgwt.module=..) and the runTarget parameter can only contain the host page URI.

When the GWT module host page is part of the module "public" folder, the runTarget MAY define the full GWT module path (com.myapp.gwt.Module/Module.html) that will be automatically converted according to the rename-to directive into renamed/Module.html.

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
contextXml File - Source Tomcat context.xml for GWT shell - copied to /gwt/localhost/ROOT.xml (used as the context.xml for the SHELL - requires Tomcat 5.0.x format - hence no default).
debugPort int - Port to listen for debugger connection on. Default value is: 8000.
debugSuspend boolean - Whether or not to suspend execution until a debugger connects. Default value is: true.
executedProject MavenProject - The MavenProject executed by the "compile" phase
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
hostedWebapp File - Location of the hosted-mode web application structure. Default value is: ${basedir}/war.
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.
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.
noServer boolean - Prevents the embedded GWT Tomcat server from running (even if a port is specified).

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

Default value is: false.
port int - Runs the embedded GWT server on the specified port. Default value is: 8888.
runTimeOut int - Forked process execution timeOut (in seconds). Primary used for integration-testing.
shellServletMappingURL String - Specifies the mapping URL to be used with the shell servlet. Default value is: /*.
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.
tomcat File - Specify the location on the filesystem for the generated embedded Tomcat directory. Default value is: ${project.build.directory}/tomcat.
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

buildOutputDirectory:

Location of the compiled classes.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.outputDirectory}

contextXml:

Source Tomcat context.xml for GWT shell - copied to /gwt/localhost/ROOT.xml (used as the context.xml for the SHELL - requires Tomcat 5.0.x format - hence no default).
  • Type: java.io.File
  • Required: No

debugPort:

Port to listen for debugger connection on.
  • Type: int
  • Required: No
  • Default: 8000

debugSuspend:

Whether or not to suspend execution until a debugger connects.
  • Type: boolean
  • Required: No
  • Default: true

executedProject:

The MavenProject executed by the "compile" phase
  • Type: org.apache.maven.project.MavenProject
  • Required: No
  • Expression: ${executedProject}

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

hostedWebapp:

Location of the hosted-mode web application structure.
  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/war

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

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

noServer:

Prevents the embedded GWT Tomcat server from running (even if a port is specified).

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

  • Type: boolean
  • Required: No
  • Expression: ${gwt.noserver}
  • Default: false

port:

Runs the embedded GWT server on the specified port.
  • Type: int
  • Required: No
  • Default: 8888

runTarget:

URL that should be automatically opened in the GWT shell. For example com.myapp.gwt.Module/Module.html.

When the host page is outside the module "public" folder (for example, at webapp root), the module MUST be specified (using a single <module> in configuration or by setting -Dgwt.module=..) and the runTarget parameter can only contain the host page URI.

When the GWT module host page is part of the module "public" folder, the runTarget MAY define the full GWT module path (com.myapp.gwt.Module/Module.html) that will be automatically converted according to the rename-to directive into renamed/Module.html.

  • Type: java.lang.String
  • Required: Yes
  • Expression: ${runTarget}

runTimeOut:

Forked process execution timeOut (in seconds). Primary used for integration-testing.
  • Type: int
  • Required: No

shellServletMappingURL:

Specifies the mapping URL to be used with the shell servlet.
  • Type: java.lang.String
  • Required: No
  • Default: /*

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

tomcat:

Specify the location on the filesystem for the generated embedded Tomcat directory.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/tomcat

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}