Search code examples
pythonpython-3.xmavenmaven-3sutime

Can't run Maven commands because no pom.xml in directory, but pom.xml doesn't show up in search?


When I run mvn commands, I'm getting this error back:

Goal requires a project to execute but there is no POM in this directory
(/Users/hojung). Please verify you invoked Maven from the correct directory.

However, I'm not finding POM in any directory at all. Has anyone run into/solved a variation of this same problem?

This is the command I'm running btw, in order to set up the installation for sutime:

mvn dependency:copy-dependencies -DoutputDirectory=./jars


Solution

  • There is no Maven without a pom.xml file

    Maven uses a pom.xml file as sort of a configuration file. It has information about how to compile, what to compile, when to compile, libraries to import, etc. If you don't have a pom.xml, there is nothing for Maven to do.

    So there is nothing to "solve".

    If your repository does not have a pom.xml file, then it can't run Maven commands. Which means you need to re-download (re-pull) the file from the repository. My guess is it got moved/deleted by accident.