1
votes

I'm learning GWT now and some issues appear that I cannot understand. I use GWT + Maven + IntelliJ IDEA.

I've created gwt project using maven plugin:

mvn -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.5.1 -DgroupId=com.savdev.BasicGwtProject -DartifactId=BasicGwtProject -Dversion=1.0 org.apache.maven.plugins:maven-archetype-plugin:generate

Set the module name to "GwtBasicModule". in the com/savdev/BasicGwtProject/client folder I've found gwt entry point with my module name: class GwtBasicModule implements EntryPoint

There are a couple of instances generated with the default project:

private final GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
private final Messages messages = GWT.create(Messages.class);

My question is, why I cannot find GreetingServiceAsync.java file. It is actually generated when I invoke maven install. Also there are no imports for both GreetingServiceAsync and Messages classes in my GwtBasicModule. I cannot import GreetingServiceAsync in IDEA cause it does appear only when I run maven install in the target folder. Could you please explain this? How to configure IntelliJ IDEA, so I could not see red text in the IDE editor.

1
Please mention which IDEA edition you are using version/community edition/licensed etc - appbootup
@SSR, Ultimate edition, version 11.1.4. - Alexandr

1 Answers

0
votes

These classes are indeed generated by Maven. You can invoke 'gwt:generateAsync' and 'gwt:i18n' goals from 'Maven Projects' tool window to generate them.