sobota, 16 stycznia 2016

Quick start with gwt-maven-plugin and important tip for easy running

Just a short tip regarding creating a new GWT project with using gwt-maven-plugin. When you create a new project following steps from the official guide, you will run something like this:

Before run generated application with command mvn gwt:run do not forget that webapp content has to be copied.
To achieve that you can change your pom.xml by adding <copyWebapp>true</copyWebapp>.

It should looks like below:

So once I click Launch Default Browser everything works fine and app is properly compiled.

It's possible also to use webAppCreator as in example here:

You can import your generated app to Eclipse using this plugin: .
I've successfully imported it to IntelliJ IDEA.

Also the super feature GWT Super Dev Mode works just out of the box. After I changed something in the Java code I could simply refresh browser to see the changes!
That's because -Dgwt.superDevMode parameter by default is set to true.

5 komentarzy:

  1. Why do you use the "GWT Super Dev Button" plugin? All you have to do is to refresh the page and your changes will be recompiled automatically (btw, I don't really understand what you mean by "after I activated SDM", where and how did you "activate" it?)

    1. Thank you for this comment. You may be right. It may have not be needed. I will check without the button and update the article then. The description of GWT Super Dev Button says: "Extension for GWT developers who uses Super Dev Mode. It is a small 'page action' button which allows to view all modules on specified codeserver and compile them without the need to add bookmarklets each time for each module."
      So I thought I activated the SDM using the button.

    2. Article updated :) Thank you Thomas. The "GWT Super Dev Button" Chrome add-on is no longer needed.

  2. That extension could be useful if you use SDM through CodeServer without -launcherDir, or before GWT 2.7.