(i) Run the command in cmd(i have installed on c drive , so I opened cmd as run as administrator)
mvn archetype:generate |
- Once after running above command, if it your first maven download archetype(Predefined structured project for specific application with sample data, first 1 is for Blank multi project for spring Boot + Elm)
- Now Maven has 3282 archetypes
- Above command, we did not mention the archetype, so maven chooses maven-archetype-quickstart archetype
Here ask for enter archetype(Press Enter to choose default – maven-archetype-quickstart archetype) or mention any specific number, here I entered sample maven project 2049
(i) archetype : Entered value 2049 maven-archetype-quickstart
(ii) version : Entered value 8 (version 1.4)
Above selected project has different versions, we can select any one of them, that code will be downloaded
(iii) groupId : Entered value groupId-SimpleMavenProject
(iv) artifactId: Entered value artifactId-MavenApp
(v) version : Entered value (pressed enter – it captures 1.0-SNAPSHOT)
(vi) package : Entered value package-MavenAppPackage
(vii) Once after the package, Maven shows us entered value to confirm with Y (Entered Y)
(viii) Then Maven starts building project, once done it shows BUILD SUCCESS
Shows us project directory with response
Project created from Archetype in dir : <directory> in my case C:\Users\gajan\artifactId-MavenApp
Let’s open this directory in file explorer, to view the structure
Project is created