Create Eclipse Dynamic Web Project With Maven – 2

I get a request to post a second way for creating Eclipse dynamic web project with maven. For who interested with first way (create maven project with console, than turn it to Eclipse project) here is the link. In this second method we will create an Eclipse dynamic web project and add Maven capabilities to that project. Let’s begin:

First of all you must install Maven Plugin for Eclipse. You need to restart Eclipse after installation.

After that we must create a new dynamic web project.
Create Dynamic Web Project

Then right click to project and go to configure section. You will see ‘Convert to Maven Project’ option here.
Convert Maven Project

You will see a popup configuration window and you can make necessary configurations from this window. For this example, I just go on with the way its popped out.
Maven Spec

You can see pom.xml after this step and you can add maven dependencies depend to your needs. Your project structure will be like below.
Project Structure

I simply add some spring dependencies to pom.xml like below.
Sample Dependencies

After saving pom.xml, right click the project and go to Maven options then install necessary dependencies from net. You can add new dependencies from Maven options or directly editing pom.xml. You can update output war file from Maven options and work directly with Eclipse integrated web server.

Developers Rock!!!

This entry was posted in Java and tagged , , , , , , . Bookmark the permalink.

1 Response to Create Eclipse Dynamic Web Project With Maven – 2

Leave a comment