I have a Maven project that I can normally compile and run from eclipse but when I compile it from command line it\'s dependencies are missing and I\'m getting errors. I can
Javac knows nothing about maven. Thus it will not utilize the maven pom.xml.
The value of maven is that it removes the manual work of building, testing and releasing a project.
This includes getting dependencies, and running javac with them added to the classpath of the javac command.
You can manually execute javac after maven downloads dependencies to ~/.m2/repository. However you'll need to tell javac where to find the jars. Thus is done via the classpath argument.
If you are trying to run the project after using mvn to compile it, you'll need to do this in the same folder where your .class files were placed. Thus should be /target/java or similar.