Jer*_*emy 2 eclipse maven guava google-cloud-dataflow
我使用Dataflow的项目编译得很好
mvn compile
Run Code Online (Sandbox Code Playgroud)
但是当我将项目导入eclipse时,eclipse无法构建项目并出现以下错误
The project was not built since its build path is incomplete. Cannot find the class file for com.google.common.reflect.TypeToken. Fix the build path then try building this project
将Guava的显式依赖添加到我的pom文件似乎解决了问题.
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>[18.0,)</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
通过运行
mvn dependency:tree -Dverbose -Dincludes=com.google.guava
Run Code Online (Sandbox Code Playgroud)
我了解到我有几个依赖于Guava的依赖,所以通过添加一个显式依赖,我可以强制maven引入一个更新的版本.
但是,我不知道为什么在命令行上运行'mvn compile'有效.
| 归档时间: |
|
| 查看次数: |
2455 次 |
| 最近记录: |