I even try to add <source path='hk.gov.ehr.service.tch.als.admin.viewer.client'/> but the same error still prompted when compile, so how to compile the java source (java file) in a dependency jar? is <inherits> in *.gwt.xml related?
On Wednesday, September 5, 2012 11:48:50 AM UTC+8, tong123123 wrote: > > I have a GWT app and I packed it into a jar using maven-source-plugin. > >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-source-plugin</artifactId> >> <version>2.2</version> >> <executions> >> <execution> >> <phase>package</phase> >> <goals> >> <goal>jar-no-fork</goal> >> </goals> >> </execution> >> </executions> >> </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 > >> <dependency> >> <groupId>hk.gov.ehr.service.tch.als</groupId> >> <artifactId>als-admin-viewer-webapp</artifactId> >> <version>1.0.0</version> >> <classifier>sources</classifier> >> </dependency> >> > > 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 > > > -- 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/-/ZRbSeXV477IJ. 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.
