Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Running a Maven webapp

Doc - somewhat outdated -  is available in the wiki : https://docs.sonatype.org/display/M2ECLIPSE/WTP+mini+howto
I'm not very familiar with Jetty, usually use it in maven. All I know is the Jetty server adapter in eclipse is not as good as the Tomcat one, which allows better, seamless deployment on resource changes.  

If you wanna stick with Jetty, I suggest you create a launch configuration in eclipse, basically running jetty:run and saving it as a file (Maven build configuration > common tab > shared file)


On Wed, Nov 17, 2010 at 7:37 PM, shef <shef31@xxxxxxxxx> wrote:
Thanks, didn't know it existed. Is there any documentation?

Installed it. (By the way, there appear to be duplicate versions of it. If you go to
http://m2eclipse.sonatype.org/sites/m2e-extras in Eclipse, you'll see "Maven Integration for WTP" under both "Maven Integration for Eclipse Extras" and "Maven Integration for Eclipse WTP Integration". Two different version numbers. I pick the higher number, 0.11.).

Now I pick Run As/Run on Server, and I get:

Http Error 503
Problem accessing /testwebapp/. Reason:
Service Unavailable
powered by Jetty

It's not clear where to find the server logs to debug the problem. Any thoughts?


From: Fred Bricon <fbricon@xxxxxxxxx>
To: Maven Integration for Eclipse users mailing list <m2e-users@xxxxxxxxxxx>
Sent: Wed, November 17, 2010 12:09:24 PM
Subject: Re: [m2e-users] Running a Maven webapp

Have you installed the m2eclipse integration for WTP plugin (aka m2eclipse-wtp) 0.11.0?
The update site is http://m2eclipse.sonatype.org/sites/m2e-extras/plugins/

Once installed, right click on your project and run Maven > Update Project Configuration

regards,

Fred Bricon

On Wed, Nov 17, 2010 at 6:51 PM, shef <shef31@xxxxxxxxx> wrote:
Using the latest version of m2eclipse, I created a new Maven project, picked the
"maven-archetype-webapp", and everything looks fine. Running "Maven package" off
the "Run As" menu creates a lovely .war file.

Now how do I run or debug the app?

Run As > Java Application does not work.

I installed WTP, but I can't seem to get Run As > Run On Server to work either.

I added:
       <plugins>
           <plugin>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>jetty-maven-plugin</artifactId>
               <version>7.2.0.v20101020</version>
           </plugin>
       </plugins>

to the POM, and now Run As / Maven Build... / Goals: jetty:run *does* work. But
debugging doesn't. When I set a breakpoint in a .jsp file I get a "source not
found" error.

There's got to be a standard way to run a webapp in Eclipse. What am I missing?



_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
"Have you tried turning it off and on again" - The IT Crowd


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users




--
"Have you tried turning it off and on again" - The IT Crowd

Back to the top