我收到“没有可用于类型 net.jzaruba.theapp.data.ColorFormResource 的源代码;您是否忘记继承所需的模块?” 位于同一个 maven 模块中的类 (net.jzaruba.theapp.client.TheEntryPoint) 中的错误,就在据称丢失的类型旁边的同级目录/包中。
TheApp/Web/src/main/module.gwt.xml:
<module>
<inherits name='com.google.gwt.user.User' />
<inherits name='net.sf.gilead.Adapter4Gwt15'/>
<inherits name="com.smartgwt.SmartGwt"/>
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
<inherits name="com.googlecode.gwt.math.Math"/>
<!-- MY OTHER MODULES -->
<inherits name="net.jzaruba.theapp.Core" />
<inherits name="net.jzaruba.theapp.Domain" />
<source path='net/jzaruba/theapp/client'/> <!-- HERE LIVES THE OFFENDING CLASS -->
<source path='net/jzaruba/theapp/data'/> <!-- THE SUPPOSEDLY UNREACHABLE TYPES -->
<entry-point class='net.jzaruba.theapp.client.TheEntryPoint' />
</module>
应用程序/Web/pom.xml:
<project>
...
<packaging>gwt-app</packaging>
...
<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0.0</version>
<extensions>true</extensions>
<configuration>
<moduleName>net.jzaruba.theapp.TheApp</moduleName>
<jvmArgs>-javaagent:${org.projectlombok:lombok:jar}=ECJ</jvmArgs>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>