I have a GWT app and I packed it into a jar using maven-source-plugin.
the output of the jar contain all the java source file. (part of it is shown in the attached figure "sourceJarContent.jpg)
Then I new another gwt project in eclipse (the project name is als-admin-viewer-webapp-forTesting) and reference this jar (als-admin-viewer-webapp-portlet-1.0.0-source.jar) by using
as shown in sourcJarContent.jpg, the jar contain a file AdvSearchLogsPanel.java, and in eclipse project als-admin-viewer-webapp-forTesting I can successfully import this java file and use it without red underline in the eclipse editior, but when I run maven compile, the following error is shown:
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 5 source files to D:\workspace\als-admin-viewer-webapp-forTesting\target\www\WEB-INF\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \workspace\als-admin-viewer-webapp-forTesting\src\main\java\hk\gov\ehr\service\tch\als\admin\viewerfortesting\client\AlsAdminViewerWebAppForTesting.java:[5,53] package hk.gov.ehr.service.tch.als.admin.viewer.client does not exist
[ERROR] \workspace\als-admin-viewer-webapp-forTesting\src\main\java\hk\gov\ehr\service\tch\als\admin\viewerfortesting\client\AlsAdminViewerWebAppForTesting.java:[6,53] package hk.gov.ehr.service.tch.als.admin.viewer.client does not exist
[ERROR] \workspace\als-admin-viewer-webapp-forTesting\src\main\java\hk\gov\ehr\service\tch\als\admin\viewerfortesting\client\AlsAdminViewerWebAppForTesting.java:[7,53] package hk.gov.ehr.service.tch.als.admin.viewer.client does not exist
[ERROR] \workspace\als-admin-viewer-webapp-forTesting\src\main\java\hk\gov\ehr\service\tch\als\admin\viewerfortesting\client\AlsAdminViewerWebAppForTesting.java:[8,53] package hk.gov.ehr.service.tch.als.admin.viewer.client does not exist
[ERROR] \workspace\als-admin-viewer-webapp-forTesting\src\main\java\hk\gov\ehr\service\tch\als\admin\viewerfortesting\client\AlsAdminViewerWebAppForTesting.java:[9,53] package hk.gov.ehr.service.tch.als.admin.viewer.client does not exist
[ERROR] \workspace\als-admin-viewer-webapp-forTesting\src\main\java\hk\gov\ehr\service\tch\als\admin\viewerfortesting\client\AlsAdminViewerWebAppForTesting.java:[10,53] package hk.gov.ehr.service.tch.als.admin.viewer.shared does not exist
maven cannot see the package hk.gov.ehr.service.tch.als.admin.viewer.client!!
I suspect this is due to setting in AlsAdminViewerWebAppForTesting.gwt.xml, and I try to add the following
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<source path='../viewer/client'/>
<source path='../viewer/shared'/>
but the error still exist when compile.
the AlsAdminViewerWebAppForTesting.gwt.xml location is attached in gwt_xml_location.jpg, I use
../viewer/client
because the AdvSearchLogsPanel.java is in als-admin-viewer-webapp-portlet-1.0.0-sources.jar under package hk.gov.ehr.service.tch.als.admin.viewer.client and the AlsAdminViewerWebAppForTesting.gwt.xml is under hk.gov.ehr.service.tch.als.admin.viewerfortesting, is the part
../viewer/client is wrong?
How to successfully compile the java file in the source.jar?
thanks in advance