Quantcast
Channel: .toString() » eclipse
Viewing all articles
Browse latest Browse all 2

How To Create A Maven Webapp In Eclipse?

$
0
0

I like Maven because it makes dependency resolution easier and I like Eclipse because it is lightweight (at least lighter than other Java IDEs) and configurable. But I hate when it comes to creating a Maven webapp in Eclipse because it is overly complicated. Till the time a simpler solution appears, here is what you need to do to create one:

  1. Make sure you have following items installed/configured in your Eclipse:
    1. WTP
    2. Tomcat (or any other servlet container)
    3. Maven Plugin
  2. Press Ctrl+N, select Maven Project and click Next.
  3. Click Next.
  4. In the Filter textfield, type maven-archetype-webapp. Select the archetype that appears in the box below and click Next.
  5. Type in Group Id (which could be same as root package of your app) and Artifact Id (which is the project name) and click Finish.
  6. Click your project name from Project Explorer (the tall pane on the left) and press Alt+Enter (it opens your project properties).
  7. Click Project Facets from the list on left hand side and then click “Convert to faceted form…” from the box on right hand side.
  8. Check and select “Dynamic Web Module” from facet list.
  9. Click the Runtimes tab on the right, check Apache Tomcat vX.0 and click Ok at the bottom of the dialog box.
  10. Select you project from Project Explorer and press Alt+Enter again.
  11. Select Deployment Assembly from the list on left hand side and click Add button from the box on right hand side.
  12. Select Java Build Path Entries, next, Maven Dependencies, finish and OK.

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images