NOTICE There is a
new plugin
(
archetypes and
eclipse integration),
a fresh start that correctly support multi-module projects, it is not version-bounded with GWT, support multiples
GWT versions and other fixes, improvements and best practices. This plugin is now considered the
legacy GWT
maven plugin (aka
mojo GWT maven plugin) and the new one is considered the
new generation GWT maven
plugin (aka
tbroyer GWT maven plugin). The legacy maven plugin is still supported but it is strongly
encouraged to use the new one for new projects.
Comfortable debugging with GWT, Maven and Eclipse
Introduction
Needed tools:
- Eclipse
- maven
- m2eclipse plugin
- Google Plugin for Eclipse
Complex structure of multimodule maven project
The tutorial will use sample structure to describe setup of whole project in Eclipse with possibility to automatically propagate change in source files of dependent modules to final GUI. The sample structure is prepared for extending with new use cases.
Let's consider simplified scenario of one framework module and one customer's web portal.
Generating Launch configuration
Steps needed to generate one of the launch configurations are as follows:
- mvn gwt:eclipse
- there will be a launch configuration generated e.g. sk.seges.mmi.cust.Universe.launch
- Just search the launch configuration in Eclipse and run it. All dependencies are resolved automatically and the GPE is copying a change transparently. If you take a look on the classpath GPE has it will be the same as the one you would setup for Java App. launch configuration.
You can now do the following:
- run dev mode with the launcher
- modify e.g. a string in Location class in fw1-mod
- press Ctrl+S in Eclipse
- press Refresh button in your browser
- voila! change appears