Artifact Handlers
The Maven Plugin for GWT provides two artifact handlers, or in other words two dependency types: gwt-lib and gwt-app.
GWT Library: gwt-lib
A gwt-lib is a JAR that contains both compiled classes and their sources.
You can depend on a gwt-lib using either <type>jar</type> or <type>gwt-lib</type> in your <dependency>.
The layout of a gwt-lib is as follows:
| File or directory | Usage |
|---|---|
<slashified moduleName>.gwt.xml |
GWT module definition, generated by gwt:generate-module |
META-INF/gwt/mainModule |
(optional) generated by gwt:generate-module-metadata, used by gwt:generate-module in downstream projects |
**/*.java |
Java sources, later used by gwt:compile, gwt:devmode, and gwt:codeserver in downstream projects |
**/*.class |
Compiled Java classes |
| Other resources | Other resources, such as *.gss, *.png, and *.ui.xml files |
GWT Application: gwt-app
A gwt-app is a WAR that only contains the output from the GWT Compiler: no WEB-INF/web.xml and no Java classes or libraries.
You can depend on a gwt-app using either <type>war</type> or <type>gwt-app</type> in your <dependency>.
Using <type>war</type> has the advantage that the maven-war-plugin will automatically overlay the gwt-app's content in the resulting WAR.
The layout of a gwt-app is as follows:
| File or directory | Usage |
|---|---|
<moduleShortName>/<moduleShortName>.nocache.js |
GWT application entry-point |
<moduleShortName>/** |
Other GWT Compiler output |
