IntelliJ 11.1 GWT support - what's really possible?

I'm a user of IntelliJ 11.1 Ultimate.

I played around a bit with GWT support and it is really frustrating to see that the GWT support in Idea is very basic if you rely on Maven, too.

Here an example:

I used the latest gwt-maven-plugin to generate a sample project:

mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.5.0-rc2

Afterwards, you are asked about groupId, artefactId, etc.

I can run this project via mvn gwt:run.

Now, I opened it in Idea by selecting the pom (and running a mvn clean before). I can see in the project settings that GWT facet was detected.

However, taking a look at parent class generated by maven archetype before, directly shows two shortcomings:

  • Idea is not generating Messages class for property files
  • Idea is not generating GreetingServiceAsync interface for server's greeting service

Now, if I google for those problems, people usually suggest to include some Maven goals in the build process. However, I can't really believe that this is necessary. I would expect that internal Idea make command should be independent of Maven, especially as I can't configure what "make" is really doing.

But maybe I'm just on the wrong track and haven't really understood how GWT, Maven and IntelliJ are supposed to work together. Please enlighten me!

Comment actions Permalink

IDEA's behaviour is different from Maven's in regard to generated interfaces for properties and async services. These interfaces are used from your
code so if they would be generated only on make you'll get 'red' code while editing your classes. So IDEA provides inspections and quick-fixes to
incrementally update these interfaces, e.g. if you add a method to a synch service IDEA suggests to create its counterpart in the async interface.

This works well until you call 'clean' goals which removes all generated interfaces. You can call 'gwt:i18n' and 'gwt:generateAsync' goals after
calling 'clean' to regenerate these interfaces.

Nikolay Chashnikov
Software Developer
JetBrains, Inc
"Develop with pleasure!"

Comment actions Permalink

I see, basically Idea only supports a sub-set of the GWT maven plugin. I tend to agree that it might be even a better idea to have things like the interfaces always checked into the VCS.

I created an example GWT app based on several modules. It is available at:

I can run the example app in dev mode via Maven, but also in Idea. So works as expected.

I still have some problems with our real dev project. Running GWT dev mode via maven works fine, but not via Idea. But I will open a new thread as soon as I can narrow the problem a bit.


Please sign in to leave a comment.