Understanding the basics
The result of a Maven build process is an artifact. Each artifact is defined by its identifier, its group, and its version. This is crucial when working with Maven, because every dependency you'll use will need to be identified by these three mentioned properties.
The structure of the Maven Java project
The idea behind Maven is quite simple—you create a project structure that looks something like this:
You can see that the code is placed in the src
folder—the code is in the main
folder and the unit tests are located in the test
folder. Although you can change the default layout, Maven tends to work best with the default layout.
The idea of POM
In addition to the code, you can see a file named pom.xml
that is located in the root directory in the previous image. This is a project object model file that describes the project, its properties, and its dependencies. That's right—you don't need to manually download dependencies if they are present in one of the available Maven...