0

I'm looking for a fool-proof method of finding the pom entry that will provide a project with a specific dependency. For example, if I have import com.google.common.io.Files, and it is not compiling because of a missing pom dependency entry, how can I find the specific dependency to add to my pom, with minimum fuss?

I know of the existence of search.maven.org, but sometimes that is unhelpful.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
HellishHeat
  • 2,280
  • 4
  • 31
  • 37
  • As far as I'm aware, there isn't one. You need to know which library provides your dependency, and I'm not aware of a Maven search engine that indexes all files within the artifacts. – Mark Rotteveel Sep 29 '22 at 08:06
  • Related, and answers actually include answers to your question: https://stackoverflow.com/questions/1342894/find-a-class-somewhere-inside-dozens-of-jar-files – Jens Schauder Sep 29 '22 at 08:17
  • I can confirm Mark, when you "mavenize" an existing project: google/search is your (only;(() friend. But most IDE's offer same/similar functionality as/to search.maven.org...commonly in the "add dependency dialog/frame". – xerx593 Sep 29 '22 at 08:24
  • On search.maven.org there is an enhanced search option to search on class base etc..?? – khmarbaise Sep 29 '22 at 08:34
  • For example, what could someone enter into a google search to find out the relevant info? – HellishHeat Sep 29 '22 at 08:36
  • "fully qualified name", so "com.google.common.io.Files" in this case ..should guide you to correct GitHub/maven/site..then the "problem" is only to find the correct/appropriate version.. – xerx593 Sep 29 '22 at 08:54

1 Answers1

1

As you have said, the search.maven.org is the best answer.