Maven is a tool to build and run Java projects. For this project we are using it to automate the process of installing dependencies and compiling the system.
The file named pom.xml in the main directory controlls how maven builds the project on each run, and also holds dependencies. The most important fields are `properties`, which holds the information about JDK and execution, and `dependencies`, which holds information on external sources needed to compile the project.
On each run, Maven will run test cases and compile into the target directory of the project.
### Installation
For Mac you can just use `brew install maven`.
### Usage
In the pom.xml file, under properties, we can add a line like the following:
What this says is that when we call `mvn exec:java`, we search under src/java and execute the `main` method of the `ObjectDetector.java` class file. In this way we can test out any main method that we want.
The best way to use this in Intellij is by creating a build configuration using the following steps:
1. In the top right, find the dropdown of the `Run` options. (this should be the left of the play button and the debug button)
2. Press `Edit Configurations...`
3. Press `Add new configuration`
4. Find the maven icon and create this build config.
5. Give the config a name, and then under `Run`, add `clean compile exec:java`, which does each command in succession.