0 Replies Latest reply on Jul 14, 2006 10:49 AM by tuomas_kiviaho

    Eclipse plugin for Maven versus Maven plugin for Eclipse

    tuomas_kiviaho

      mvn eclipse:eclipse is not the only available option to automate eclipse project mapping to pom.xml. The Maven 2.x Plug-in for Eclipse <http://m2eclipse.codehaus.org/> doesn't generate static .classpath entries from pom.xml but instead tries to map the whole pom (and it's parents) as one dynamic classpath variable. "Mavenizing" of a project is merely Maven>Enable from project pop-up menu. The approach is more transparent to the user since modifications to the pom.xml are visible to the user directly. Modifications to the parent pom.xml are noted are noted as well but not instantly.

      Drawback in this approach is that instead of mapping workspace projects the mapping is currently done to maven repositories. There is work being done to get the pom.xml aftifact resolution to prefer workspace projects over repository artifacts .<http://jira.codehaus.org/browse/MNGECLIPSE-59>

      By using separate checkout location (complete maven tree model consisting of module & parent relations from SCM) from workspace and picking up preferred projects to workspace as indirect references to the checkout location gives more control over workspace. And the best part is that mvn commands can still be done to the checkout location since it is maven compliant. Non recursive usage of mvn let's you drop part of the tree.