This is just a quick not on how to run a maven project from the CLI – command line interface.
cd
into the root directory of the project.- Run
mvn compile
. - Then, to execute a class with a main method (usually the Application class) execute the following Maven command:
mvn exec:java -Dexec.mainClass=[your class here]
For example, let’s say you have a class with a main method in called Application
, and that class is in a package named com.myname.myproject
. Then the command to execute the main method would be:
mvn exec:java -Dexec.mainClass=com.myname.myproject.Application