Search code examples
javamysqlmavenjdbcm2eclipse

Eclipse m2eclipse can't find any mysql in dependencies search


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?


Solution

  • 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.