How to search the Maven coordinates – pom.xml dependency?

If you want to include a library dependency in “pom.xml” file, you have to define the “Maven coordinate


<!-- MySQL database driver -->
<dependency>
	<groupId>mysql</groupId>
	<artifactId>mysql-connector-java</artifactId>
	<version>5.1.9</version>
</dependency>

However, one of the annoying problem of this is you do not know what’s the Maven coordinate details – group id, artifactId and etc. Many Java developers just browse the Maven central repository and search for it. If the dependency library is package in a deep folder structure, you may have problem in digging work.

Maven coordinates workaround

Here’s a dirty workaround it – Google site search Maven repository. The Google search function is powerful enough to find the Maven’s coordinate for you.

Let say, you want to know the “logback” Maven’s coordinates , you can search it in Google with search text


logback site:http://repo1.maven.org/maven2/

Google will return the result.


http://repo1.maven.org/maven2/ch/qos/logback/

I really hope Maven can provide a search function in the Maven repository in future.

4 comments on “How to search the Maven coordinates – pom.xml dependency?

  1. gtko take my thanks too, this was really needed info for me too ……..

    Reply
  2. Use the search mechanism here – http://mvnrepository.com/

    For instance, in the search bar
    1) Type Log4j

    This displays links to “Apache Log4j” and “SLF4J LOG4J-12 Binding”
    2) Click on the Apache Log4j link and select the version you want.

    This will display the coordinates for Mave, Ivy, Gradle, etc.

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *