How to convert existing Java Project to Maven in Eclipse?

Last updated
App Shah
Crunchify » Eclipse IDE Tutorials » How to convert existing Java Project to Maven in Eclipse?

I know there were times it was very hard to us to move Java Projects to Maven. Lots of hurdle moving files from one directory to another, adding dependencies, etc.

You may need to install m2e-eclipse plugin in order to have this simple utility in Eclipse.

m2e-Eclipse Plugin

In your eclipse just right click on Java Project and click Configure and you should see “Convert to Maven Project” option.

Convert Project to Maven Project in Eclipse

You should see dialogue like this below. Just add “Name” and you should be all set.

Maven Project - Provide GroupID and Artifact ID - Crunchify Tips

Don’t forget to add your all custom dependencies in pom.xml file.

Here is a sample pom.xml file

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">

18 thoughts on “How to convert existing Java Project to Maven in Eclipse?”

  1. The hardest thing in ant to maven conversion is finding the correct dependency versions. Usually what everyone does is look inside jar META-INF folder and find the pom.xml. But there are cases you cannot find the exact version of a jar.
    The most accurate method in this situation is to calculate the jar file hash and do a reverse search in Nexus repository. File hashes can be calculated with the help of Microsoft FCIV utility.
    Everything is explained in this article step by step.

    • Thanks Dinusha for detailed comment. Appreciate it 🙂

      I’ve slight difference suggestion also for readers. It’s also a good practice to upgrade dependencies to latest version to get all latest security fixes.

  2. Hi App, Nice Article. How to convert the existing application into Maven project from resource level.?, because I am having 4 projects under a single application.
    Thanks for this article.

    • Hi Srikanth – thanks. So you have 4 different projects in Eclipse environment? I didn’t get you what you mean by 4 projects under single application?

      Could you please share some more light?

  3. Hi App – thanks for nice article. Worked like a charm for me. Really Appreciate your all work on Crunchify. Would like to join Crunchify. Do we have any open position?


  4. Excellent. Why didn’t you expand on proofreading the

    POM.xml file to validate the entries? As the JSF project may or may not have duplicate entries or incorrect entries, as the POM file would be the controlling tool for a CLEAN project ? yes ? no ?


Leave a Comment