It sounds like you have non-gwt-capable classes in packages meant for GWT - is that deliberate? For example, test classes to make sure the various server components in your project work, but they are in your .client or .shared package?
-- If they are not, then GWT will totally ignore them, as no .gwt.xml as indicated that those packages are able to be compiled at all.
On Thursday, November 20, 2014 11:05:27 AM UTC-6, Phineas Gage wrote:
On Thursday, November 20, 2014 11:05:27 AM UTC-6, Phineas Gage wrote:
I'm in the process of Maven-izing my GWT 2.6.1 project (an intermediate step to start using GWT 2.7.0), and as a first step want to switch to maven style directory structure (as suggested by the Maven GWT Plugin documentation), so I make two simple moves:[project]/src => [project]/src/main/java[project]/test => [project]/src/test/javaBut what happens when I do this is that the regular "GWT Compile" from the Google Plugin for Eclipse fails with the -strict option, because it tries to compile my test classes as GWT source code, and of course can't find the classes they reference, for example (source files names obfuscated with extra ...'s):[ERROR] Errors in 'file:/.../src/test/java/.../...Test.java' [ERROR] Line 20: No source code is available for type org.junit.Assert; did you forget to inherit a required module?(... repeated with many other files)I'm confused because this doesn't happen with my old directory structure, and I don't know why the GWT compiler would go back up into my test directory to compile classes there. Strangely, it also doesn't happen with this structure, which I accidentally moved to once:[project]/src => [project]/src/java/main[project]/test => [project]/src/java/testIt almost seems like the GWT compiler is doing something special with the default Maven directory structure. And any of the solutions I can think of are not very clean:- Not use the Google Plugin for Eclipse, but only use the Maven GWT Plugin, but then I lose some features from the Google Plugin for Eclipse that I want- Not compile with -strict, but then I don't catch other warnings as easily- Use an exclude in my *.gwt.xml source paths to exclude **/*Test.java, but then I might still catch some unintended utility classes in my test package- Not use a parallel package structure for my tests, but then it's not possible to test package protected classes and methods- Not make [project]/src/test/java a source directory in Eclipse, but I don't know what the side effects of that areHow are people handling this, or am I missing something?
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment