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.
- Java Core Technology - Java RegEx, Java XML, Java I/O, Java Misc
- J2EE Frameworks - Hibernate, Spring 2.5, Spring MVC, Struts 1.x, Struts 2.x
- Build Tools - Maven, Archiva
- Unit Test - jUnit, TestNG
- Client Scripts - jQuery
[...] Search Maven coordinates with Google How do you know the library Maven coordinate? Search it folder by folder on Maven repository? Here’s a tip to use Google site search to get the Maven coordinate from Maven repository. [...]
[...] Here’s a workaround for the Maven coordinates – Use Google site search function [...]