MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
support-rkalla
Post subject: [Configuration] How do I get Maven to work with MyEclipse?  PostPosted: May 22, 2007 - 03:47 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits