in Maven, Tutorials

[Tutorial] Create, compile and test a project with Maven

Here is a first video tutorial about Maven, under DOS.
First i create a project based on the maven-archetype-quickstart archetype with the following command and arguments :

mvn archetype:generate 

Archetypes are sort of templates of projects.
This command creates a folders structure and a basic Java class that displays the classic “Hello World!”. It also creates a JUnit test class named .
The groupId corresponds to the name of the package
The artifactId corresponds to the name of the project.
Regarding the terminology, archetype is called a plugin and generate is called a goal.

Then i compile the project and run the test.

mvn compile
mvn test

The compiled classes are generated in the target folder.
Link to the video tutorial :

More info :