How to search public Maven/Ivy repositories for a particular class?
Asked Answered
C

5

41

There are web sites like http://mvnrepository.com/ letting to search for an "artifact" and giving a definition I can add to my project for a library to be downloaded automatically from a public repository.

But this particular example (mvnrepository.com) (the only working I know actually) is by-definition limited to "search by group, artifact or description" while I would like to search by a class full name. For example I'd like to enter org.apache.commons.lang.NotImplementedException to get <dependency org="commons-lang" name="commons-lang" rev="2.6"/> (or alike) as the answer. Is there a facility for this?

Cuccuckold answered 7/4, 2012 at 18:6 Comment(1)
I usually start at jarfinder.com.Chrischrism
P
21

The answer of @khmarbaise is straight and correct, but if you possibly want to search over few additional public Maven repos (like JBoss), not only Maven Central, I recommend using http://grepcode.com.

EDIT: Unfortunately it seems http://grepcode.com, I used to strongly recommend for such a stuff, is dead now. Currently I don't know a better place than https://search.maven.org, already answered by @khmarbaise.

Predisposition answered 7/4, 2012 at 21:21 Comment(3)
While it could be handy sometimes, right now indexed jars in GrepCode are quite outdatedKaminsky
Getting HTTP 503 Service Unavailable for grepcode.comHerra
Yep, it seems Grepcode is dead (RIP - I used that site a LOT), so hope the community can find a new website for doing thisGigue
V
47

If you like to search for Classes you should use http://search.maven.org and click on "Advanced search"...This is for Maven Central

Vindicate answered 7/4, 2012 at 18:35 Comment(2)
That "advanced search" gave me 470 artifacts for one standard class :-( Is there a less advanced but more usable search engine?Enginery
You can use something like this in a search box: v:"2.6.4" c:"com.sun.jersey.spi.container.servlet.ServletContainer"Bobbee
P
21

The answer of @khmarbaise is straight and correct, but if you possibly want to search over few additional public Maven repos (like JBoss), not only Maven Central, I recommend using http://grepcode.com.

EDIT: Unfortunately it seems http://grepcode.com, I used to strongly recommend for such a stuff, is dead now. Currently I don't know a better place than https://search.maven.org, already answered by @khmarbaise.

Predisposition answered 7/4, 2012 at 21:21 Comment(3)
While it could be handy sometimes, right now indexed jars in GrepCode are quite outdatedKaminsky
Getting HTTP 503 Service Unavailable for grepcode.comHerra
Yep, it seems Grepcode is dead (RIP - I used that site a LOT), so hope the community can find a new website for doing thisGigue
M
4

I suggest to try all the search engines. Now I've lost hours thinking of how to upload an artifact, while it turned out to be already present in the repo. This is junit-addons, which is both groupId and artifactId, as can be verified in pom. My attempts:

  1. http://mvnrepository.com - no
  2. http://search.maven.org - yes
  3. http://grepcode.com - no
  4. http://jarfinder.com - yes, but only a direct download, not for maven

I am a maven newbie, so I cannot state that the second link is the best. Although tt was the only helpful in my case.

Mispickel answered 23/9, 2012 at 8:32 Comment(1)
The jarfinder domain is now for sale.Stratum
I
4

https://javalibs.com/ is a good online site to search maven repos.

Comment at Apr. 17th 2022:
It seems this site can't be opened any more.

Innes answered 29/2, 2020 at 6:28 Comment(0)
I
2

One more search engine: JAR-Download.com:

Inheritor answered 22/4, 2021 at 13:6 Comment(1)
this answer provides the simplest solution for the requestAlula

© 2022 - 2024 — McMap. All rights reserved.