【发布时间】:2015-09-26 03:29:57
【问题描述】:
我正在尝试将 Dagger 2 作为我的依赖注入框架与 Vaadin 集成。但是,看起来可能与 Vaadin 和 Dagger 的 Guava 依赖项中包含的 Guava 版本存在冲突。我已将 IntelliJ 中的构建命令范围缩小到 vaadin:compile,结果如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project vaadin: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR]
[ERROR]
[ERROR] An annotation processor threw an uncaught exception.
[ERROR] Consult the following stack trace for details.
[ERROR] java.lang.NoSuchMethodError: com.google.common.collect.Multimaps.filterKeys(Lcom/google/common/collect/SetMultimap;Lcom/google/common/base/Predicate;)Lcom/google/common/collect/SetMultimap;
我尝试将构建路径中 Dagger 编译器的范围更改为 provided,但仍然遇到问题。
有没有办法解决 Vaadin 和 Dagger 之间的编译时间问题?
【问题讨论】:
-
请尝试排除低版本旧番石榴依赖。新版本几乎总是向后兼容。
-
vaadin-client 已经设置为“provided”,所以我不确定如何在不破坏 Vaadin 的情况下进一步排除它。
-
Here 写的是如何完全排除依赖关系。您可以使用
mvn dependency:tree查看完整的依赖树
标签: java web dependency-injection vaadin dagger-2