title: How to build project from maven pom file
body: <p>I have a maven pom file for an open source project. This pom file has all the info like what other jars it depends on etc. I installed maven. Created a dir samprj and copied the pom file into that dir. Cd into that dir and ran mvn command without any arguments but I got bunch of errors. I am absolutely new to maven so I think I am missing something. I tried also from Eclipse ( Import project -- exisitng maven project) but that also does not work except eclipse creates a project that has just that file pom.xml. I expect something that first it will download the jar for the project and then download all dependent jars and config files but nothing there.
  So given a pom file how do I build the project from it?</p>