通过classname查找pom依赖项

fly*_*ire 16 java dependencies maven-2 pom.xml

如何通过classname找到依赖项?

特别是,我想在我的项目中包含这个类org.mortbay.jetty.testing.ServletTester,我该怎么做?你是怎么找到答案的?

Ric*_*ler 9

Nexus allows you to search for artifacts by class name as well as GroupId, ArtifactId, and Version. Nexus uses Lucene to index artifacts. The Sonatype public repository allows you to search the major repositories.

Enter org.mortbay.jetty.testing.ServletTester in the search field and hit the search icon. You'll get no results because by default Nexus searches for keywords. To refine the search to match class names, select the down arrow next to the Keyword Search label on the search page and select Classname search (see screenshot). You'll then find a list of matching artifacts.

搜索截图

Nexus also has Opensearch integration, so you can add the search to your Firefox/IE 7 search field. See the Nexus book for more details on setting this up.

There's also a video with more details on the search options available.


dfa*_*dfa 1

从版本 6.1 开始,Netbeans 可以将给定类所需的依赖项添加到 pom.xml