我需要在Maven中导入哪个依赖项 [英] Which dependency do I need for this import in Maven

查看:166
本文介绍了我需要在Maven中导入哪个依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将使用Ant的Java项目转换为Maven项目,但是很难找出要包含的依赖项.

I am trying to convert a Java project which uses Ant into a Maven project, but am having difficulties finding out which dependencies to include.

如何找到特定导入的依赖项设置?

How do I find out dependency settings for a particular import?

推荐答案

至少在Eclipse中,当您按住CTRL +单击一个导入的类,并且选择了链接为编辑器",然后打开字节码轮廓,并在其所在的jar中选择文件.

Provided you currently have the jars on your build-path, at least in Eclipse, when you CTRL + click an imported class, and you have selected "link with editor" on the package explorer, the bytecode outline is opened and the file is selected within the jar it is located.

然后,使用m2eclipse插件,右键单击pom-> Maven->添加依赖项,然后在其中键入jar的名称.在大多数情况下都可以.

Then, having the m2eclipse plugin, you right-click your pom -> Maven -> Add dependency, and type the name of the jar there. In most cases that would do.

这篇关于我需要在Maven中导入哪个依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆