Sunday, May 12, 2013

Import the Maven project into Eclipse

Software: Eclipse Java EE Juno.

Before we import the Maven project to Eclipse, install the Maven plug-in first. On Eclipse, go to Help -> Eclipse Marketplace..., and search for maven. Install the one as highlighted. Eclipse will ask you to restart once the install is finished.


























After Eclipse restarts, go to File -> Import...


























 Browse the top directory of the project (the directory that contains src, target .classpath, .project, and pom.xml) and click on Finish




After the project is imported, a project tree will look like. Note that, the dependency junit-3.8.1 as specified in the pom.xml is automatically included in the project, and the file junit-3.8.1.jar is located in the local Maven repository, that's the power of Maven. Maven make life much easier.

























Previous: Create a Maven project


No comments:

Post a Comment