GWT Module ... not found in project sources or resources
gwt, java
Solution
I found the solution to this. The problem was that the module specified in the gwt-maven-plugin has to be the exact path name of the .gwt.xml file, not the entry point file.
So the configuration file has to be:
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k </extraJvmArgs>
<module>com.mycompany.myoroject.MyMainModule</module>
<inplace>true</inplace>
<force>true</force>
<disableCastChecking>true</disableCastChecking>
<style>PRETTY</style>
<warSourceDirectory>${basedir}/war</warSourceDirectory>
</configuration>
becasue my MyMainModule.gwt.xml is under src/main/com/mycompany/myproject/MyMainModule.gwt.xml.
Many thanks for your answers.
Problem
I am new to GWT. I tried to make a web application and uses the following maven config to config gwt. I put it in a profile so only when the profile is invoked will the gwt being compiled. The profile is like: ``` <profiles> <profile> <id>gwtCompile</id> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.5.0</version> <configuration> <extraJvmArgs>-Xmx512M -Xss1024k </extraJvmArgs> <module>com.mycompany.MyMainModule</module> <inplace>true</inplace> <force>true</force> <disableCastChecking>true</disableCastChecking> <style>PRETTY</style> <warSourceDirectory>${basedir}/war</warSourceDirectory> </configuration> <dependencies> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwt.version}</version> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-dev</artifactId> <version>${gwt.version}</version> </dependency> </dependencies> <executions> <execution> <id>compileJS</id> <phase>process-classes</phase> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> ``` When I run the command: ``` mvn clean install -Dmaven.test.skip=true -PgwtCompile ``` it gave me error message: ``` GWT Module com.mycompany.MyMainModule not found in project sources or resources. ``` My MyMainModule.gwt.xml is like this: ``` <?xml version="1.0" encoding="UTF-8"?> <module> <inherits name='com.google.gwt.user.User' /> <entry-point class='com.mycompany.MyMainModule' /> <source path='client' /> <source path='shared' /> </module> ``` I can see some online documents said multiple module project is supposed to have this error. But mime is not a multi-module project. Can someone let me know what possibly went wrong with this? Many thanks. EDIT: I have got this in place: ``` <resources> <resource> <directory>${basedir}/src/main/java</directory> <includes> <include>**/client/**</include> <include>**/*.gwt.xml</include> </includes> </resource> <resource> <directory>${basedir}/src/main/resources</directory> <includes> <include>**/*</include> </includes> </resource> </resources> ```