0

My class complains that it couldn't find HttpServletRequest. I can google and find out what maven dependency to include in the pom file. But , is there any maven command to find out what could be the dependency to include. when we develop any maven based java application, There could be always errors like this. How to tackle them with the help of maven commands ?

Thanks, Arun

Arun Kamalanathan
  • 8,107
  • 4
  • 23
  • 39
  • AFAIK there is no maven command that will achieve this. This question: http://stackoverflow.com/questions/1500141/find-a-jar-file-given-the-class-name details command line scripts that you could use to search your local maven repository for all jars containing a particular class. – DB5 Oct 08 '13 at 07:21
  • possible duplicate of [Maven - How to find correct groupId/artifactId to include dependency in POM](http://stackoverflow.com/questions/3565889/maven-how-to-find-correct-groupid-artifactid-to-include-dependency-in-pom) – Joe Oct 08 '13 at 12:22

1 Answers1

1

I don't think there's such a plugin (yet). What I would do is use http://search.maven.org/#advancedsearch and fill the classname. Since this searchmethod has an API one could wrap it with a Maven plugin.

Robert Scholte
  • 11,889
  • 2
  • 35
  • 44
  • AFAIK, no. Actually, even the hosting of Maven Central is not done by the Apache Maven team, but by Sonatype. http://search.maven.org is the most official site. – Robert Scholte Oct 09 '13 at 16:45