<groupId>hk.gov.ehr.service.tch.als</groupId>
<artifactId>als-admin-viewer-core</artifactId>
<version>1.0.0</version>
<package>jar</package>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependency>
<groupId>hk.gov.ehr.service.tch.als</groupId><artifactId>als-admin-viewer-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency><classifier>sources</classifier>
<groupId>hk.gov.ehr.service.tch.als</groupId>
<artifactId>als-admin-viewer-core</artifactId>
<version>1.0.0</version></dependency>
[INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ als-admin-viewer-webapp ---
[INFO] auto discovered modules [hk.gov.ehr.service.tch.als.admin.viewer.AlsAdminViewerWebApp]
[INFO] Compiling module hk.gov.ehr.service.tch.als.admin.viewer.AlsAdminViewerWebApp
[INFO] Validating newly compiled units
[INFO] Ignored 5 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] Scanning for additional dependencies: file:/D:/workspace/als-admin-viewer-webapp/src/main/java/hk/gov/ehr/service/tch/als/admin/viewer/client/SearchLogsPanel.java
[INFO] 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?
[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?
what is the reason? seem the AlsAdminViewerWebApp still cannot see the source java file of core!!
Oh, after adding <source path='core'/>, it work now (the webapp can compile, can see the source in core jar).
I have checked and see the als-admin-viewer-core-1.0.0-sources.jar is located in the als-admin-viewer-webapp-1.0.0.war\WEB-INF\lib\
just 'core' is enough because the full package name of core is
hk.gov.ehr.service.tch.als.admin.viewer.core
and the AlsAdminViewerWebApp.gwt.xml is located in package
hk.gov.ehr.service.tch.als.admin.viewer
even in a different application (core in jar and gwt.xml in war)?
if the full package name of the core is
com.abc.core, then
in gwt.xml, should write
source path='com.abc.core'?
And I found there is no need to use the compileSourcesArtifacts paramer in gwt:compile.
in fact, I do not understand the sectionUsing general purpose JARs as GWT library
in http://mojo.codehaus.org/gwt-maven-plugin/user-guide/library.html
hope there will be a clear example for that section.
use specific "DTOs" for your GWT-RPC and copy them from/to your classes from the 'core' package