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.

This article was posted in Maven category.