GWT Module XXX not found in project sources or resources.

Problem

After adding a dependency to a GWT module, which is declared as Maven dependency, GWT Maven plugin does not compile correctly.

[INFO] ————————————————————————
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] GWT Module org.restlet.Restlet not found in project sources or resources.
[INFO] ————————————————————————

Solution

The solution in this case was rather simple. The module name was not correct (it was org.restlet.gwt.GWT).

However, other causes might be:
– an old version of the GWT Maven plugin – in that case make sure to use the 1.3-SNAPSHOT or 1.3.1.google versions
– the jar archive downloaded from the Maven repository might not include *.java sources. In this case a better version for this JAR must be found. The compileSourcesArtifacts might also help (Writing a GWT Library; Maven plugin documentation compileSourcesArtifacts)

Resources

Writing a GWT Library with Maven GWT plugin
GWT Maven Plugin 2.1 (???)
Maven plugin documentation compileSourcesArtifacts
Post Maven and GWT can live together
Configure Maven, GWT and eclipse
Example how to set up GWT with Maven dependencies (Vaadin)
JIRA Bug report for inherited modules not being compiled by GWT maven plugin
Mojo class, which generates the error message
Nabble message
Another mail group discussion

One thought on “GWT Module XXX not found in project sources or resources.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s