Tuesday, February 24, 2015

Re: GWT & Dagger 2

On Tuesday, February 24, 2015 at 2:29:17 PM UTC+1, Vasco Andrade Silva wrote:
My issues are:

#1 generated sources aren't available for gwt compilation

mvn compile

no errors are found in the compilation phase, dagger 2 generated sources land in target/generated-sources/annotations/

However running:

mvn compile gwt:compile

GWT compilation outputs the following error:

[ERROR] Errors in 'file:/path/to/project/src/main/java/path/to/project/client/ProjectEntryPoint.java'
[INFO] [ERROR] Line 79: No source code is available for type path.to.project.client.Dagger_ProjectComponent; did you forget to inherit a required module?
[INFO] [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 problem seems related with the fact that GWT compilation isn't including the generated sources, as target/generated-sources/annotations/ isn't included in the classpath of the GWT compiler. The project class paths that are included in GWT compile command are:

Which version of the maven-compiler-plugin are you using? m-compiler-p didn't add the generated-sources to the compileSourceRoots until version 3.2: https://jira.codehaus.org/browse/MCOMPILER-157, so you had to use the build-helper-maven-plugin to add it.

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