Searching the Maven Repository

November 11, 2008 By Tim OBrien

2 minute read time

A common question from Apache Maven users is "How do I search the central repository?" or "How do I find out what groupId or artifactId I should use for a specific dependency?" Use Sonatype's Nexus installation at http://repository.sonatype.org to search multiple repositories at once. Sonatype has an instance of Nexus serving as a mirror of a number of repositories including Central. If you are looking for the right XML to put in your project's POM for a dependency like Log4J or ActiveMQ, just load repository.sonatype.org in your browser..

Then type in part of an artifactId or a groupId, and you should see a result screen that finds all matching artifacts across several repositories:

This is a quick way for you to locate the available versions for a particular version and find out what the appropriate groupId, artifactId, and version is for a dependency. If you need more detail, you can click on the POM link to the right of each entry to view the POM for that paricular artifact, and if you would like to download the artifact, click on the artifact link.

If you would like to browse the repositories, click on the browse repositories link on the left-hand side of the window. In the list of repositories, you will see both groups and repositories. Nexus groups are collections of repositories exposed from a single URL.

Looking for artifacts? Go to http://repository.sonatype.org.

In the next episode... search for JARs by a hash or an MD5 fingerprint... and searching for class names.

Tags: search, Nexus Repo Reel, Everything Open Source, Maven

Written by Tim OBrien

Tim is a Software Architect with experience in all aspects of software development from project inception to developing scaleable production architectures for large-scale systems during critical, high-risk events such as Black Friday. He has helped many organizations ranging from small startups to Fortune 100 companies take a more strategic approach to adopting and evaluating technology and managing the risks associated with change.