0

I have m2eclipse and its extras installed and am using Helios/Mvn2/jdk6/Tomcat 7/MacOs. I've been able to create a test maven webapp and run it on Tomcat 7 in Eclipse. But I can't get an existing application to 'Run on Server' via Eclipse. I've run into numerous configuration issues, almost all to do with the Eclipse .project/.classpath/.settings files. I've removed and recreated them many times, even copying the config files from the webapp that worked. I can't locate any documentation from Eclipse that goes through the basics and explains how to configure these files. Is there any such documentation?

At the moment, the application doesn't seem to be deploying the webapp files; tomcat can't find them.

I can launch tomcat outside Eclipse, build and deploy the application as a war successfully, but in Eclipse there is still this configuration issue.

 <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
     .settings/org.eclipse.wst.common.component

Not sure what is missing, as the configuration is the same between the the two apps. Any help would be appreciated. Thanks!

1
  • Have you tried opening the project as a maven project in Eclipse after doing an mvn eclipse:clean (to remove existing eclipse configuration)?
    – Raghuram
    Commented Jan 31, 2011 at 7:00

1 Answer 1

0

.settings/org.eclipse.wst.common.component isn't meant to be edited manually - unless you have to add a workaround for some specific bug.

When using m2eclipse, m2eclipse will create/modify .classpath, .project and any file under .settings automatically. Generation/modification happens on project creation, checkout, modification of pom.xml and on right-click on project with selection of Maven->"Update Project Configuration". For web applications, m2eclipse uses some values from your configuration of the maven-war-plugin in your pom.xml to generate these files. For details see Integration of m2eclipse and WTP. Instead of editing manually, you should change your pom.xml and settings in Eclipse.

I recommend re-creating the project according to this tutorial. See this stackoverflow answer for additional hints.

Concerning the documentation of org.eclipse.wst.common.component: The content of this file can safely be modified in Eclipse under Project->Properties->"Module Assembly". Just add/remove different folders and references and see how org.eclipse.wst.common.component changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.