【发布时间】:2018-08-21 15:21:15
【问题描述】:
我想用版本mongodb:bson:3.8.0
当我在 IDE (Intellij) 中运行这个项目时,它使用了 bson:3.8.0
但是,当我使用命令构建它时:
mvn clean install
它将与另一个版本一起运行:org.mongodb:bson:3.3.0
这是依赖树:
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-org.mongodb:bson:3.8.0
and
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-org.mongodb:bson:3.3.0
and
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-org.mongodb:mongodb-driver-async:3.3.0
+-org.mongodb:bson:3.3.0
and
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+-org.mongodb:mongodb-driver-async:3.3.0
+-org.mongodb:mongodb-driver-core:3.3.0
+-org.mongodb:bson:3.3.0
当我显示 Bson lib 的路径时,我得到了结果:
当我在 IDE 中运行时:../org/mongodb/bson/3.8.0/bson-3.8.0.jar
当我使用 mvn 命令构建后运行时:../app/lib/mongo-java- driver-3.3.0.jar
【问题讨论】:
标签: java mongodb maven dependencies