How to convert java project to maven project in eclipse

Posted on December 3, 2016

In this post, we will learn how to convert a java project to maven project in eclipse.

Technologies used -

  • Eclipse Mars.2 (4.5.2)
  • Maven 3.3.9
  • Java 8

Follow the following steps for converting java project to maven project.


Step #1

Create a Java project.

Go to File → Other → Java → Java Project. Click on Next.


Step #2

In New Java Project dialog, provide the project name as MyJavaProject and click on Finish.


You will see the below folder structure of newly created java project.



Step #3

Right click on MyJavaProject.

Go to Configure → Convert to Maven Project.


You will see the below dialog. Now add Name and Description and click on Finish.


Step #4

Review the new folder structure of maven project.


Sample pom.xml file

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
  <description>This a sample java project</description>