Maven Creating Project - Maven

How to create a project with Maven?

Archetype plugins are used by Maven to create projects. Use maven-archetype-quickstart plugin to create a simple java application. Let’s create a maven based java application project in C:\MVN folder.
Now open the command console, go to the C:\MVN directory and execute the following mvn command.
Maven will start processing and will create the complete java application project structure.
Now go to C:/MVN directory. You'll see a java application project created, named consumer Banking (as specified in artifactId). Maven uses a standard directory layout as shown below −
Using the above example, we can understand the following key concepts −
Sr.No. Folder Structure & Description


contains src folder and pom.xml



contains java code files under the package structure (com/companyName/bank).



contains test java code files under the package structure (com/companyName/bank).



it contains images/properties files (In above example, we need to create this structure manually)

If you observe, you will find that Maven also created a sample Java Source file and Java Test file. Open C:\MVN\consumerBanking\src\main\java\com\companyname\bank folder, you will see
Open C:\MVN\consumerBanking\src\test\java\com\companyname\bank folder to see
Developers can store their files as mentioned in table above and Maven handles all the build related complexities.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Maven Topics