Saturday, January 28, 2017

Re: GWT/Maven: No source code is available for type junit.framework.Test; did you forget to inherit a required module?

Hello Jens!

On Saturday, January 28, 2017 at 5:24:56 PM UTC+1, Jens wrote:
  • src/main/java/mylib/general
  • src/main/java/mylib/web
src/main/java/mylib/web.gwt.xml

  <module>
  <inherits name='com.google.gwt.user.User'/>
  <source path='web'/>
 </module> 

That would work, as long as src/main/java/mylib or src/main/java/mylib/general is not exposed to GWT compiler by any other GWT module you might have.

I guess you mean having another *.gwt.xml file that reference some folder under /src/main/java/mylib/general?
 
Its basically the same as with using client, shared and server folder

I already noticed this naming convention, but where is it documented?
 
An alternative approach for library code is to not split the code up into distinct packages like you did but instead use an annotation and then build two different jar's (one that only contains GWT code, and another only containing code incompatible to GWT) by reading the annotation. That is basically the approach Guava uses to build guava.jar and guava-gwt.jar.

Sounds interesting. Where can I read about this?

Thank you
Magnus
 

--
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 post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment