After creating a maven project using maven archetype:generate command, the maven project would be generated, but you can’t directly import it into Eclipse as a normal project.
You can import the project in Eclipse in following ways:
- Run mvn eclipse command to create eclipse project structure and then import as normal project
(OR)
- Import the project as a Maven project
Generate eclipse project structure and then Import as normal project
Convert the generated project to eclipse project by running the following command from command prompt:
mvn eclipse:eclipse
This command should be run from the path where pom.xml is present. For example, we created the “SpringXMLApp” project in C:\projects and the pom.xml is inside the SpringXMLApp folder. So, we run the command from C:\projects\SpringXMLApp
C:\projects\SpringXMLApp>mvn eclipse:eclipse
This would convert it to an Eclipse project.
Now, lets import the project in Eclipse using :
File ->Import -> Existing Projects into Workspace
Import as Maven project
From Eclipse editor, import the project as a Maven project using following option :
File -> Import -> Maven -> Existing Maven Projects
© 2016, https:. All rights reserved. On republishing this post, you must provide link to original post
[…] this project in Eclipse. Refer following article if you need help importing the project : Import Maven project in Eclipse Now, lets add jersey-client dependency in pom.xml : […]
[…] Import Maven project in Eclipse […]
[…] Import Maven project in Eclipse […]
[…] Import Maven project in Eclipse […]
[…] Import Maven project in Eclipse […]