| Quote: |
|
I use MyEclipse and Maven2. It is a little bit of a pain, but the tomcat launcher is really worth it. This is my recipe: In the pom.xml of the web project: |
| Code: |
|
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <projectnatures> <java.lang.String>com.genuitec.eclipse.j2eedt.core.webnature</java.lang.String> <!-- e.g., also <java.lang.String>com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature</java.lang.String> --> <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String> </projectnatures> <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory> </configuration> </plugin> </plugins> </build> |
| Quote: |
|
Then I run "mvn eclipse:eclipse" and import the project into eclipse, and exit eclipse. Then I edit the .mymetadata file that MyEclipse made and add a context-root="/context-root" attribute to the project-module tag. Also, I set the webrootdir attribute in this file. |
| Code: |
|
<attributes> <attribute name="webrootdir" value="/src/main/webapp" /> </attributes> |
| Quote: |
|
Then in MyEclipse everything should work. |