Creating Project in Maven

Steps to Create Project in Maven



Step 1:Execute command(windows cmd)

mvn archetype:generate

archetype generate project structure for your project based on archetype selection



Step 2: choose archetype for your project or Enter to select default archetype



Step 3:Choose archetype version



Step 4:Define value for Group_id which is Project name



Step 5:Define value for artifact id



Step 6:Define value for package


Step 7:Click Enter button to Build a project.

Step 8:Now if everything working fine then you will get Build success message.


Step 9:You can see project is created.



Step 10: See the Project folder maven automatically created src folder and pom.xml file




Converting Maven Project to Eclipse support Project



Step 1:Navigate to Maven project where your pom.xml present.
and Execute below command.

mvn eclipse:eclipse


Step 2:if everything working fine then you will get Build success message


Step 3: You can see the .class and .project file created Now you can import this project into eclipse and Start development


Importing project into Eclipse

step 1:select import in file menu



step 2:Click on general and select import Project folder



step 3:Click on Browse and Select your Project folder



step 4:Click on next



step 5:Click on finish button



step 6:You can see the Project is successfully imported.


Leave a Reply

Your email address will not be published. Required fields are marked *