gwt:run

Full name:

org.codehaus.mojo:gwt-maven-plugin:2.4.0:run

Description:

Goal which run a GWT module in the GWT Hosted mode.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Invokes the execution of the lifecycle phase process-classes 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
appEngineArtifactId String 2.1.0-1

groupId to download appengine sdk from maven repo


Default value is: appengine-java-sdk.
appEngineGroupId String 2.1.0-1

groupId to download appengine sdk from maven repo


Default value is: com.google.appengine.
appEngineHome File 2.1.0-1

Location to find appengine sdk or to unzip downloaded one see appEngineVersion


Default value is: ${project.build.directory}/appengine-sdk/.
appEngineVersion String 2.1.0-1 set the appengine sdk to use

Artifact will be downloaded with groupId : appEngineGroupId and artifactId appEngineArtifactId


Default value is: 1.3.8.
bindAddress String 2.1.0-1 Set GWT shell bindAddress.

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


blacklist String - Set GWT shell protocol/host blacklist.

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


compileSourcesArtifacts String[] - Artifacts to be included as source-jars in GWTCompiler Classpath. Removes the restriction that source code must be bundled inside of the final JAR when dealing with external utility libraries not designed exclusivelly for GWT. The plugin will download the source.jar if necessary. This option is a workaround to avoid packaging sources inside the same JAR when splitting and application into modules. A smaller JAR can then be used on server classpath and distributed without sources (that may not be desirable).
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).
copyWebapp boolean 2.1.0-1 Copies the contents of warSourceDirectory to hostedWebapp.

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


Default value is: false.
deploy File 2.3.0-1 The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the webappDirectory directory/jar, and may be the same as the extra directory/jar)
executedProject MavenProject - The MavenProject executed by the "compile" phase
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.
gwtSdkFirstInClasspath boolean 2.1.0-1 The forked command line will use gwt sdk jars first in classpath. see issue http://code.google.com/p/google-web-toolkit/issues/detail?id=5290
Default value is: false.
hostedWebapp File - Location of the hosted-mode web application structure.
Default value is: ${project.build.directory}/${project.build.finalName}.
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:inplace http://maven.apache.org/plugins/maven-war-plugin/inplace-mojo.html goal.
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.
runClasspathExcludes List 2.1.0-1

List of Pattern jars to exclude from the classPath when running dev mode


runTimeOut int - Forked process execution timeOut (in seconds). Primary used for integration-testing.
server String - Specifies a different embedded web server to run (must implement ServletContainerLauncher)
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.
systemProperties Map 1.2 List of System properties to pass when running the hosted mode.
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}.
whitelist String - Set GWT shell protocol/host whitelist.

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


Parameter Details

appEngineArtifactId:

groupId to download appengine sdk from maven repo

  • Type: java.lang.String
  • Since: 2.1.0-1
  • Required: No
  • Expression: ${gwt.appEngineArtifactId}
  • Default: appengine-java-sdk

appEngineGroupId:

groupId to download appengine sdk from maven repo

  • Type: java.lang.String
  • Since: 2.1.0-1
  • Required: No
  • Expression: ${gwt.appEngineGroupId}
  • Default: com.google.appengine

appEngineHome:

Location to find appengine sdk or to unzip downloaded one see appEngineVersion

  • Type: java.io.File
  • Since: 2.1.0-1
  • Required: No
  • Expression: ${gwt.appEngineHome}
  • Default: ${project.build.directory}/appengine-sdk/

appEngineVersion:

set the appengine sdk to use

Artifact will be downloaded with groupId : appEngineGroupId and artifactId appEngineArtifactId

  • Type: java.lang.String
  • Since: 2.1.0-1
  • Required: No
  • Expression: ${gwt.appEngineVersion}
  • Default: 1.3.8

bindAddress:

Set GWT shell bindAddress.

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

  • Type: java.lang.String
  • Since: 2.1.0-1
  • Required: No
  • Expression: ${gwt.bindAddress}

blacklist:

Set GWT shell protocol/host blacklist.

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

  • Type: java.lang.String
  • Required: No
  • Expression: ${gwt.blacklist}

buildOutputDirectory:

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

compileSourcesArtifacts:

Artifacts to be included as source-jars in GWTCompiler Classpath. Removes the restriction that source code must be bundled inside of the final JAR when dealing with external utility libraries not designed exclusivelly for GWT. The plugin will download the source.jar if necessary. This option is a workaround to avoid packaging sources inside the same JAR when splitting and application into modules. A smaller JAR can then be used on server classpath and distributed without sources (that may not be desirable).
  • Type: java.lang.String[]
  • Required: No

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

copyWebapp:

Copies the contents of warSourceDirectory to hostedWebapp.

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

  • Type: boolean
  • Since: 2.1.0-1
  • Required: No
  • Expression: ${gwt.copyWebapp}
  • Default: false

deploy:

The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the webappDirectory directory/jar, and may be the same as the extra directory/jar)
  • Type: java.io.File
  • Since: 2.3.0-1
  • Required: No

executedProject:

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

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

gwtSdkFirstInClasspath:

The forked command line will use gwt sdk jars first in classpath. see issue http://code.google.com/p/google-web-toolkit/issues/detail?id=5290
  • Type: boolean
  • Since: 2.1.0-1
  • Required: No
  • Expression: ${gwt.gwtSdkFirstInClasspath}
  • Default: false

hostedWebapp:

Location of the hosted-mode web application structure.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/${project.build.finalName}

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:inplace http://maven.apache.org/plugins/maven-war-plugin/inplace-mojo.html goal.
  • 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

runClasspathExcludes:

List of Pattern jars to exclude from the classPath when running dev mode

  • Type: java.util.List
  • Since: 2.1.0-1
  • Required: No

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

server:

Specifies a different embedded web server to run (must implement ServletContainerLauncher)
  • Type: java.lang.String
  • Required: No
  • Expression: ${gwt.server}

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

systemProperties:

List of System properties to pass when running the hosted mode.
  • Type: java.util.Map
  • Since: 1.2
  • Required: No

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}

whitelist:

Set GWT shell protocol/host whitelist.

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

  • Type: java.lang.String
  • Required: No
  • Expression: ${gwt.whitelist}