 |
|
 |
 |
|
 |
 |
| Author |
Message |
|
|
Post subject: [Configuration] How do I get Maven to work with MyEclipse?
Posted: May 22, 2007 - 03:47 AM
|
|
Moderator


Joined: Jan 06, 2004
Posts: 23347
|
|
We ran across a post by a MyEclipse User, Benjamin Keil that describes how to get Maven2 support working in MyEclipse. We hope this provides good steps for folks that need to use Maven2 support in MyEclipse until official support for Maven is added to MyEclipse.
Below is Benjamin's post, quoted for completeness:
| 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.
|
|
|
|
| |
|
|
|
 |
|
|
| |
|
|
 |
|
 |
|
|
|
 |