[Configuration] How do I get Maven to work with MyEclipse?

Home Forums MyEclipse IDE FAQ – Installation, Configuration & Subscriptions [Configuration] How do I get Maven to work with MyEclipse?

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Riyad Kalla Riyad Kalla 8 years ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #270476
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    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:

    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:

    
    <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>
    

    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.

    
    <attributes>
        <attribute name="webrootdir" value="/src/main/webapp" />
    </attributes>
    

    Then in MyEclipse everything should work.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.