On Monday, May 21, 2012 10:57:49 AM UTC+2, tong123123 wrote:
>
> I have a mavenize gwt module depends on a jar(this jar is simple jar, no 
> gwt related).
> the project name of the jar is als-admin-viewer-core with maven coordinate
>
>> <groupId>hk.gov.ehr.service.tch.als</groupId>
>> <artifactId>als-admin-viewer-core</artifactId>
>> <version>1.0.0</version>
>> <package>jar</package>
>>
>
> and the mavenize gwt module name is 
> als-admin-viewer-webapp
> and in its .pom.xml, I already add the dependency as follow:
>
>> <dependency>
>>     <groupId>hk.gov.ehr.service.tch.als</groupId>
>>     <artifactId>als-admin-viewer-core</artifactId>
>>     <version>1.0.0</version>
>> </dependency>
>>
>
> then I run mvn clean install of the jar project first ( 
> als-admin-viewer-core), then I run mvn clean install for mavenize gwt 
> project "als-admin-viewer-webapp", 
> but then the following error prompt:
>
>> error:
>> Computing all possible rebind results for 
>> 'hk.gov.ehr.service.tch.als.admin.viewer.client.SearchService'
>> [INFO]          Rebinding 
>> hk.gov.ehr.service.tch.als.admin.viewer.client.SearchService
>> [INFO]             Checking rule <generate-with 
>> class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/>
>> [INFO]                [ERROR] Errors in 
>> 'file:/D:/workspace/als-admin-viewer-webapp/src/main/java/hk/gov/ehr/service/tch/als/admin/viewer/client/SearchService.java'
>> [INFO]                   [ERROR] Line 16: No source code is available for 
>> type hk.gov.ehr.service.tch.als.admin.viewer.core.LogSearchCriteria; did 
>> you forget to inherit a required module?
>> [INFO]                   [ERROR] Line 17: No source code is available for 
>> type hk.gov.ehr.service.tch.als.admin.viewer.core.Log; did you forget to 
>> inherit a required module?
>>
> there is no error in eclipse IDE at design time, and I already add the 
> dependency of the jar in als-admin-viewer-webapp's .pom.xml, why it still 
> cannot find the class 
> "hk.gov.ehr.service.tch.als.admin.viewer.core.LogSearchCriteria" in " 
> als-admin-viewer-core"?
> is modification of .gwt.xml needed? I see the developer guide of gwt, and 
> it only mention add <inherit> element to other .gwt.xml module, no need to 
> add any jar in <inherit> element in .gwt.xml !!
>

GWT needs the Java source code, so generate a sources JAR and add it as a 
dependency too.

See 
https://github.com/tbroyer/gwt-maven-archetypes/blob/master/modular-webapp/src/main/resources/archetype-resources/shared/pom.xml#L24
 which 
generates the sources JAR (the configuration is inherited from 
https://github.com/tbroyer/gwt-maven-archetypes/blob/master/modular-webapp/src/main/resources/archetype-resources/pom.xml#L68),
 
and 
https://github.com/tbroyer/gwt-maven-archetypes/blob/master/modular-webapp/src/main/resources/archetype-resources/client/pom.xml#L83
 which 
uses it.
Documentation for the maven-source-plugin: 
http://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html
See also 
http://mojo.codehaus.org/gwt-maven-plugin/user-guide/library.html#Using_general_purpose_JARs_as_GWT_library

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/wW0ifPlxN2EJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to