Wednesday, August 3, 2022

Re: net.ltgt.gwt.maven and testing in multi-module project structure?

This error happens at the test time.

On Wednesday, August 3, 2022 at 5:47:43 PM UTC-7 Slava Imeshev wrote:
Continuing the journey, in this multi-module client/shared/server structure, is it possible to have the shared code in a package different from the client? 

I get 

"No source code is available for type com.effectiveem.app.gwt.shared.GapAnalysisLineItemVO; did you forget to inherit a required module?
[ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly"

The client sits in com.effectiveem.app.gwt.client.

Client's pom sets the module name to 

<moduleName>com.effectiveem.app.gwt.client.EemApp</moduleName>


On Wednesday, July 13, 2022 at 1:53:19 AM UTC-7 t.br...@gmail.com wrote:
On Wednesday, July 13, 2022 at 3:06:37 AM UTC+2 ime...@gmail.com wrote:
Thank you, the setting the <include> did it.

FYI, using a GWTTestSuite can improve performance (that's why it's the default in the plugin, because it favors best practices): https://www.gwtproject.org/doc/latest/DevGuideTesting.html#DevGuideJUnitSuites
 
My next question about testing is, what are the expectations for the test module? Are we still required to provide a separate JUnit.gwt.xml?

You've never been (or at least not for many many years) as GWT will synthesize a module that inherits both com.google.gwt.junit.JUnit and the module your GWTTestCase's getModuleName() returns.
The gwt-maven-plugin itself has no specific expectations either, so https://www.gwtproject.org/doc/latest/DevGuideTesting.html should apply as-is (I haven't re-read it though, but that's the goal of the plugin, to be a "thin" wrapper that only wires things that are specific to Maven, e.g. src/main/java, computing the classpath from dependencies, etc.)

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/c442f720-ec9d-4ab0-ba17-98dd6a1324d6n%40googlegroups.com.

No comments:

Post a Comment