Eclipse m2eclipse在依赖项搜索中找不到任何mysql
我正在学习 Maven 并试图找到它经常被告知的自动下载所需 jar 的能力。现在我需要在我的应用程序中访问 Mysql 数据库。因此,我在 pom.xml
可视化编辑器中打开 Dependency
选项卡,然后选择 Add...
按钮。然后我在搜索字符串中输入mysql
。
Eclipse 什么也没发现。
Mysql JDBC 库不在 Maven(中央?)存储库中,这是真的吗?或者可能是我刚刚配置了错误的东西? Maven 能否在寻找 JDBC 库的任务中发挥自己的作用?
I am learning Maven and trying to find it's often told ability to download required jars automatically. Now I need to access Mysql database in my application. So I opened Dependencies
tab in pom.xml
visual editor and selected Add...
button. Then I entered mysql
in the search string.
Eclipse found nothing.
It this true that Mysql JDBC libraries are not on the Maven (central?) repository? Or may be I just configured something incorrectly? Can Maven show itself in the task of looking for JDBC library?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Mysql 位于中央 Maven 存储库中。 M2E 使用此存储库。您可以在 Eclipse 的 Maven 存储库视图中查看所有活动存储库(
Window > Show View > Other... > Maven > Maven Repositories
)。在存储库的上下文菜单中,您可以更新或修复存储库的索引。Mysql is in the central Maven repo. M2E uses this repo. You can see all active repositories in Eclipse's Maven repository view (
Window > Show View > Other... > Maven > Maven Repositories
). In the context menu of an repository you can update or repair the repository's index.是的,mysqlconnector 在 Maven 存储库中。
您还可以在此处进行检查。
MySQL JDBC 连接器位于 Maven 存储库中。
我没有将 Eclipse 与 Maven 一起使用,但您可能想验证 Maven 是否查找您想要的存储库(检查
settings.xml
并检查 Maven 构建日志)。Yes, mysqlconnector is in the maven repository.
You can additionaly check it here.
MySQL JDBC connector is on maven repository.
I have not used eclipse with maven but you might want to verify that maven looks up repositories you want (check
settings.xml
and check maven build logs).