-1

I'm new in Maven,Java and Eclipse. I just download a project that uses Maven. I want to know how can import and run this project by Eclipse. I install m2eclipse and work with it but i don't know how can I import a existing project.

Mahdi
  • 1,777
  • 4
  • 24
  • 48

4 Answers4

1

You need a maven plugin for Eclipse. m2eclipse or Apache Maven Plugin

This links will help you to import the project. M2eclipse Guideline and Importing maven project into eclipse

Community
  • 1
  • 1
Kayser
  • 6,544
  • 19
  • 53
  • 86
0

Use the Maven Eclipse Plugin. It generates the necessary files for the Eclipse IDE.

magomi
  • 6,599
  • 5
  • 31
  • 38
0

For running maven project you will need to install maven plugin in eclipse and than right click on it and select run as maven install

Rajan Garg
  • 317
  • 1
  • 3
  • 7
0

Here is an alternate way without using m2Eclipse plugin.

Install Maven and add the bat file to the path. Once this is done open a command prompt and go to the directory where the pom.xml file of your project exists. At this directory level do a:

mvn eclipse:eclipse

This will make your project Eclipse friendly. Once this is completed, import the project by using File Menu in Eclipse. File->Import. In dialog select Existng Projects into Workspace. Click Next. Then select the root directory as the directory from which you ran the mvn command. Click Finish.

You project should now be in your Eclipse IDE

Dhanush Gopinath
  • 5,652
  • 6
  • 37
  • 68