Maven/Tomcat Projects In Eclipse Indigo/3.7
Asked Answered
E

2

25

I'm trying out the next version of Eclipse using the latest milestone build and I'm having an issue getting my Maven project deployed to Tomcat.

Previously in Eclipse 3.6, my project was automatically enabled as a web project when checked out from SVN. I've checked out my project in 3.7 but get nothing indicating it's runnable as a web project (e.g. trying to run the project doesn't give me the usual "Run on Server" option).

What I've installed is Indigo RC4 "Eclipse IDE for Java EE Developers" version. I then added the latest M2E milestone from here. This enabled me to get up and running, check out my project and I seem to be able to build the project fine (which does create my .war file for remote deployment). Still no "Run On Server" options though.

Does anyone have any clues on what I could be missing? I'm guessing it's a Maven & WTP integration plugin but I haven't spotted the right one yet.

Enswathe answered 15/6, 2011 at 10:38 Comment(0)
R
46

Before m2e became an eclipse project the WTP integration shipped with the core module. Now the core module is an eclipse module and the WTP integration is shipped separately. The current Indigo snapshots of m2eclipse-wtp can be found here. I was unable to get any artifacts from this update site however, even though it's listed in the corresponding JIRA issue.

Fortunately, today m2e-wtp was made available through the m2e Marketplace. Just open the eclipse preferences, go to 'Maven' -> 'Discovery' -> 'Open Catalog' and install it. m2e Marketplace.

Redon answered 23/6, 2011 at 15:37 Comment(4)
Fantastic. I had also seen the update site but couldn't down anything from it. Going via the catalog has worked fantastically for me though.Enswathe
After hours of frustration, samy-delux's comment worked for me (install m2e wtp extra from repository.sonatype.org/content/repositories/forge-sites/…). I had to remove and re-import my project for it to work...Disqualify
I had issue that eclipse stayed in 0% progress of "Installing software" all the time. After couple restarts, I set -vmargs -Xms256m -Xmx1024m in eclipse.ini and "Installing software" passed.Robrobaina
I followed steps by @samy-delux. There was no error during installation and after finishing installation I restarted Eclipse. Still I was not getting Run -> Run on server menu option. It might be some issue with installation. I tried twice but no luck. Then I tried to install from Eclipse Market Place(Help -> Eclipse Market Place...] and finally it worked.Chanel
A
21

It will work with the lastet version, it's just the .project that is not right.

Simply go into the project properties, make the projet faceted.. tick Dynamic Web Module and you'll get run on server as an option after that. Update Project Facets

This will enable the "Run on Server" option, however your problems don't finish there as when you then run it, you'll get a 404.

To fix this, go back into project properties, Deployment assembly.

Deployment Assembly

Delete the WebContent entry (and you can delete the folder in the project later too), and make sure you have the src-main-webapp & src-main-resource folders added.

Bingo.. run the app and it should be fine.

Apogamy answered 12/7, 2011 at 12:46 Comment(1)
wow this is the missing piece no one else talks about thank you so much @ApogamyDoor

© 2022 - 2024 — McMap. All rights reserved.