Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting Maven project to Dynamic Web Project for Eclipse

  1. Create a web project using Maven:

    mvn archetype:generate -DgroupId=com.trial -DartifactId=message 
       -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
    
  2. Convert the project to Eclipse web project using:

    mvn eclipse:eclipse -Dwtpversion=2.0
    
  3. Import existing project into Eclipse:

enter image description here

The project icon contains an folder instead of a web icon and folder icon. I find this a bit strange and when I try to run also, the run on server option is missing. I am sure I followed the steps correctly. Where may I be lagging to obtains such a result ?

like image 738
Manish Basdeo Avatar asked Aug 03 '13 19:08

Manish Basdeo


People also ask

How do I add pom files to dynamic web project?

Right click on the project > Properties > MyEclipse > Project Facets and select the one you want to install to your project. The Maven Support – Dependencies Only Facet allows you to benefit from Maven's dependency resolution, without having to move your projects to a fully Maven based build.


1 Answers

I have the below's suggestions :

  1. First check whether your eclipse is in Jave EE Perspective or not. If it was in only Java perspective, run option will not come.

  2. Right click on your project, go to properties.

    Click on Project Facets

    Check whether Dynamic Web module is check marked or not. If not just check marked it.

like image 68
Nirdesh Sharma Avatar answered Sep 30 '22 18:09

Nirdesh Sharma