如何在公共Maven/Ivy存储库中搜索特定类? [英] How to search public Maven/Ivy repositories for a particular class?
问题描述
有些网站如 http://mvnrepository.com/可以搜索工件"并提供我可以在项目中添加一个定义,以便从公共资源库自动下载一个库.
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.
但是这个特定的示例(mvnrepository.com)(我实际上唯一知道的工作)是按定义的,仅限于按组,工件或描述搜索",而我想按类的全名进行搜索.例如,我想输入org.apache.commons.lang.NotImplementedException
来获取<dependency org="commons-lang" name="commons-lang" rev="2.6"/>
(或类似名称)作为答案.有这个设施吗?
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?
推荐答案
@khmarbaise 的答案是正确无误,但是,如果您可能想搜索几个其他的公共Maven仓库(例如JBoss),不仅是Maven Central,我建议使用 http://grepcode.com .
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.
不幸的是,我曾经 http://grepcode.com 强烈推荐这种东西,现在已经死了.目前,我不知道比 https://search.maven.org 更好的地方,已经由 @khmarbaise .
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.
这篇关于如何在公共Maven/Ivy存储库中搜索特定类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!