Since Dagger 2.9 I get this error when compiling GWT:
Tracing compile failure path for type 'dagger.super.javax.inject.package-info'
[ERROR] Errors in 'jar:file:/work/.m2/repository/com/google/dagger/dagger-gwt/2.9/dagger-gwt-2.9.jar!/dagger/super/javax/inject/package-info.java'
[ERROR] Line 155: The declared package "javax.inject" does not match the expected package "dagger.super.javax.inject"
Tracing compile failure path for type 'dagger.super.javax.inject.Qualifier'
[ERROR] Errors in 'jar:file:/work/.m2/repository/com/google/dagger/dagger-gwt/2.9/dagger-gwt-2.9.jar!/dagger/super/javax/inject/Qualifier.java'
[ERROR] Line 17: The declared package "javax.inject" does not match the expected package "dagger.super.javax.inject"
Tracing compile failure path for type 'dagger.super.javax.inject.Inject'
[ERROR] Errors in 'jar:file:/work/.m2/repository/com/google/dagger/dagger-gwt/2.9/dagger-gwt-2.9.jar!/dagger/super/javax/inject/Inject.java'
[ERROR] Line 17: The declared package "javax.inject" does not match the expected package "dagger.super.javax.inject"
Tracing compile failure path for type 'dagger.super.javax.inject.Provider'
[ERROR] Errors in 'jar:file:/work/.m2/repository/com/google/dagger/dagger-gwt/2.9/dagger-gwt-2.9.jar!/dagger/super/javax/inject/Provider.java'
[ERROR] Line 17: The declared package "javax.inject" does not match the expected package "dagger.super.javax.inject"
Tracing compile failure path for type 'dagger.super.javax.inject.Scope'
[ERROR] Errors in 'jar:file:/work/.m2/repository/com/google/dagger/dagger-gwt/2.9/dagger-gwt-2.9.jar!/dagger/super/javax/inject/Scope.java'
[ERROR] Line 17: The declared package "javax.inject" does not match the expected package "dagger.super.javax.inject"
Tracing compile failure path for type 'dagger.super.javax.inject.Named'
[ERROR] Errors in 'jar:file:/work/.m2/repository/com/google/dagger/dagger-gwt/2.9/dagger-gwt-2.9.jar!/dagger/super/javax/inject/Named.java'
[ERROR] Line 17: The declared package "javax.inject" does not match the expected package "dagger.super.javax.inject"
Tracing compile failure path for type 'dagger.super.javax.inject.Singleton'
[ERROR] Errors in 'jar:file:/work/.m2/repository/com/google/dagger/dagger-gwt/2.9/dagger-gwt-2.9.jar!/dagger/super/javax/inject/Singleton.java'
[ERROR] Line 17: The declared package "javax.inject" does not match the expected package "dagger.super.javax.inject"
[ERROR] Aborting compile due to errors in some input files
Indeed, dagger-gwt in 2.9 is badly packaged: it includes dagger/super/… which should no longer be there. I suspect the release was cut using mvn deploy without a preliminary mvn clean.
As a workaround, put the following in a dagger/DaggerFixed.gwt.xml file in your own project:
<module>
<inherits name="dagger.Dagger" />
<source path="" excludes="super/**" />
</module>
then use it at least once in your project. That should properly exclude the extraneous super/ subpackage.
@ronshapiro: maybe cut a new 2.9.1 release with mvn clean deploy? (we'd probably need to add a simple sample / integration test to use as a smoke test, but I'm not sure how you'd want to do this with the move to Bazel; releases should eventually be smoke-tested by e.g. installing artifacts locally, build Maven-based samples, then deploy the artifacts if all went well)
Dagger 2.10 released but no Dagger 2.10 for dagger-gwt...
Ouch!
Workaround:
dagger-gwt dependency with dagger, and add dependency on dagger and javax.inject sources (<classifier>sources</classifier>; in addition to the "normal" dependencies; i.e. instead of dagger-gwt you should now have at least 3 dependencies: dagger, dagger sources and javax.inject sources)javax/inject/Inject.gwt.xml with content:xml
<module>
<source path=""/>
</module>
dagger/Dagger.gwt.xml with contentxml
<module>
<inherits name="javax.inject.Inject"/>
<source path=""/>
</module>
@tbroyer does that mean no offical GWT support anymore?
@Martin-Wegner I'm not a project member so I can't tell, but I hope not and doubt it.
Between 2.9 and 2.10, Dagger replaced the Maven-based build with a Bazel-based one, with shell and python scripts to generate POMs and deploy to Maven repositories; and the dagger-gwt got forgotten in the migration (I believe this is because Google don't actually need it with their internal version of Bazel/Blaze; and it has special needs compared to the other artifacts: its dependencies have a classifier).
I'm hoping to get to this shortly, it's just not so standard given our setup. Hope to fix it all soon.
@ronshapiro See #644. Hopefully I didn't break anything.
This is now fixed
@ronshapiro can we expect a 2.10 release?
@ronshapiro
This is now fixed
Almost: https://travis-ci.org/google/dagger/builds/228091094#L3941-L3947
Publishing maven snapshot... File "util/maven/generate_poms.py", line 127 def dependencies_comparator(first, second): ^ SyntaxError: invalid syntax
This has been introduced by 4a18d62539b3294be4eb6a49fa91379a09b6bfe7
That's fixed in #726. There'll be a snapshot once that's merged (and travis builds)
I've verified that there's a new snapshot of dagger-gwt now. I'll release 2.11-rc2 now
And I verified that 2.11-rc2 works OK :wink:
https://travis-ci.org/tbroyer/gwt-maven-archetypes/builds/228678238