1
votes
  1. When I run a simple web-app consisting of just a simple servlet and a simple jsp page I do not get "run as - on Server" option in Eclipse. I can run that on command line successfully using Jetty Plugin. I am comfortable doing Maven stuffs from Command line but am having problem when using Eclipse.

  2. Can someone point to some link which shows how to use maven with Eclipse. I saw Sonatype site but am not satisfied.

  3. Also why is Ear packaging recommended for maven(I heard so)?

I am using Eclipse Indigo (not WTP) & m2e & Maven 3.

UPDATE - I have configured both Tomcat 6 and Glassfish 3 in Eclipse and they work for non-maven projects. Im trying to run this simple maven -web project in Tomcat

"The problem is that when I create a non-maven web-project in Eclipse the contents go inside the folder "Web-Content" which is recognised by Eclipse and thus I can have an option like Run on Server and am also able to add projects on Server inside Eclipse. But for maven web-projects the contents(and web.xml) reside in src/main/webapp and is thus not recognised by Eclipse.

UPDATE 2 - I created maven project by selecting "maven-archetype-webapp" archetype. Created a simple Servlet and added its entries inside src/main/webapp. I run "maven install" and the build was successful. Packaging is war. But am not able to add project to the server like a normal web-project

1

1 Answers

0
votes
  1. You should configure server instances in eclipse to be able to run on them from eclipse

  2. You can generate eclipse project files by maven, or use one existing maven plugins for eclipse ( the all suck, but some suck more ;) )

  3. Who recommends this? Maven does not force you to use EAR packaging - you need it if you like to deploy application consisting of multiple web modules with some EJB modules as single artifact.

PS: I would recommend to use IDEA - even free community edition is way better than eclipse