Creating Maven Projects in MyEclipse
This tutorial describes how to create a web project that integrates with Maven. A simple checkbox creates a Maven-enabled project. In this tutorial, you will learn how to:
- Create a new Maven project
- Import an existing Maven project
Duration Time: 10 Minutes
Don't have MyEclipse? Download Now
- Select File>New, and select the type of project you want to create. You can add Maven support to Web, EJB, EAR, and conventional Java projects.
- Fill in the fields on the New Project window, select the Add Maven support checkbox, and click Next until you reach the Artifact page.
- Enter the Group ID and Artifact ID. These follow typical package and project naming conventions.
The project structure defaults to a standard MyEclipse project structure. You can choose to use the Maven project structure instead.
- Click Next to add additional libraries, or Finish to accept default libraries and create the project.
The Project Explorer displays all maven dependencies, and in the pom.xml file the dependencies are outlined as XML.
You can add technology facets to the Maven project in the same way that you add facets to other MyEclipse projects.
You can import an existing Maven project by selecting the root folder in which the project files reside.
- Select File>Import, expand Maven4MyEclipse, select Existing Maven Projects, and click Next.
- In the Root Directory field, browse for the Maven project root folder. The projects contained in the root appear in the Projects list.
- Select all projects, or select only the ones you want to import, and click Finish.