Thursday, January 26, 2017

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



On Thursday, January 26, 2017 at 5:26:21 PM UTC+1, Magnus wrote:
Hello Thomas!

> I'd suggest getting Maven to work before Eclipse

Let me explain this:
I am in the middle of a migration of my code towards Maven. Before this, I had this situation:
  • a pure java library (lib-java)
  • a GWT-based java library (lib-gwt)
  • several applications which use both libraries (lib-java and lib-gwt)
In the first steps, I moved the two libraries to Maven. They compile fine and the target jar's are build.
The applications are still based on the GWT-plugin for eclipse, i. e. non-Maven projects.

GWT doesn't care about folders, it reads resources from the classpath.

But then I don't really understand the sense of the *.gwt.xml files, which explicitely include source folders.

No, they subset the classpath by defining subpackages, independently of where they come from (and they sort-of superset the classpath with super-source too).
Still, classpath/classloader based, not file/folder based.
 
That said, a properly configured Eclipse+Maven+GWT project should configure GWT tasks to only include src/main/java.

How do I do that, while the application is still outsife of Maven?
(In eclipse I can only select dependend projects.)

In the launch configuration, you should be able to tweak the classpath manually to remove the src/test/java entry (which should be independent from the "dependent projects")

--
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