This is just a quick not on how to run a maven project from the CLI – command line interface.
cdinto the root directory of the project.
- 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