右键点击工程,属性(properties),选择deployment assembly选项,单击add按钮,如下图:

在弹出的对话框选择java build path entries

 next后选择Maven Dependencies即可

参考文章: