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

一曲冷凌霜 提交于 2019-12-03 06:23:19

问题


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?


回答1:


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.




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/10056975/how-to-search-public-maven-ivy-repositories-for-a-particular-class

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!