How to convert existing java project to maven project

In this post, we will see how to convert existing java project to simple java maven project.

Steps for converting existing java project to maven project:

Step 1:
Install m2eclipse for maven plugin in eclipse. Please follow this link for installing m2eclipse plugin in eclipse.

Step 2:
Right click on project -> configure -> convert to maven project.

Provide group id and artifact id , I have kept them default.

Let me tell you more about group id and artifact id.

Group id : It uniquely identifies your project among all. So it may be something like com.companyname

Artifact id : It is name of jar or war without version. it may be something like project, so here we have put artifact id as ReadPropertiesFileJavaExample.

Step 3:
Click on finish button.

Step 4:
Just remember to put all dependencies in pom.xml

Bingo!! You have converted existing java project to maven project

Was this post helpful?

Comments

Leave a Reply

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