Index: src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
===================================================================
--- src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java	(revision 386716)
+++ src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java	(working copy)
@@ -95,6 +95,12 @@
     private static final String FILE_DOT_CLASSPATH = ".classpath"; //$NON-NLS-1$
 
     /**
+      * Whether or not we're outputting a .classpath that will be used with m2eclipse.
+      * If we are, then no entries to things in M2_REPO are outputted.
+      */
+    private boolean m2eclipse;
+
+    /**
      * Dependencies for our project.
      */
     private Collection artifacts;
@@ -229,6 +235,11 @@
             }
             else
             {
+                // don't write out things from M2_REPO if we're using m2eclipse
+                if (getM2eclipse()) {
+                    return;
+                }
+
                 File localRepositoryFile = new File( localRepository.getBasedir() );
 
                 String fullPath = artifactPath.getPath();
@@ -242,7 +253,7 @@
                 if ( sourceArtifact.isResolved() )
                 {
                     sourcepath = "M2_REPO/" //$NON-NLS-1$
-                        + EclipseUtils.toRelativeAndFixSeparator( localRepositoryFile, sourceArtifact.getFile(), false );
+                      + EclipseUtils.toRelativeAndFixSeparator( localRepositoryFile, sourceArtifact.getFile(), false );
                 }
                 else
                 {
@@ -296,4 +307,11 @@
 
     }
 
+    public boolean getM2eclipse() {
+        return m2eclipse;
+    }
+    
+    public void setM2eclipse( boolean m2eclipse ) {
+        this.m2eclipse = m2eclipse;
+    }
 }
Index: src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
===================================================================
--- src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java	(revision 386716)
+++ src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java	(working copy)
@@ -72,14 +72,20 @@
 
     private static final String BUILDER_WST_COMPONENT_STRUCTURAL = "org.eclipse.wst.common.modulecore.ComponentStructuralBuilder"; //$NON-NLS-1$
 
+    private static final String BUILDER_M2ECLIPSE = "org.maven.ide.eclipse.maven2Builder"; //$NON-NLS-1$
+
     private static final String NATURE_WST_MODULE_CORE_NATURE = "org.eclipse.wst.common.modulecore.ModuleCoreNature"; //$NON-NLS-1$
 
     private static final String NATURE_JDT_CORE_JAVA = "org.eclipse.jdt.core.javanature"; //$NON-NLS-1$
 
+    private static final String NATURE_M2ECLIPSE = "org.maven.ide.eclipse.maven2Nature"; //$NON-NLS-1$
+
     private static final String NATURE_JEM_WORKBENCH_JAVA_EMF = "org.eclipse.jem.workbench.JavaEMFNature"; //$NON-NLS-1$
 
     private static final String COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER = "org.eclipse.jdt.launching.JRE_CONTAINER"; //$NON-NLS-1$
 
+    private static final String COMMON_PATH_M2ECLIPSE_CONTAINER = "org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"; //$NON-NLS-1$
+
     //  warning, order is important for binary search
     public static final String[] WTP_SUPPORTED_VERSIONS = new String[] { "1.0", "R7", "none" }; //$NON-NLS-1$ //$NON-NLS-2$  //$NON-NLS-3$
 
@@ -260,7 +266,16 @@
      */
     private boolean wtp10;
 
+
     /**
+      * When set to true, the appropriate nature and builder for m2eclipse will be added. 
+      * The default is false.
+      * Also, the .classpath will not have any references to M2_REPO, as m2eclipse handles that.
+      * @parameter expression="false"
+      */
+    private boolean m2eclipse = false;
+
+    /**
      * @see org.apache.maven.plugin.Mojo#execute()
      */
     public void execute()
@@ -404,7 +419,11 @@
 
         new EclipseSettingsWriter( getLog(), eclipseProjectDir, project ).write();
 
-        new EclipseClasspathWriter( getLog(), eclipseProjectDir, project, artifacts ).write( projectBaseDir,
+        EclipseClasspathWriter classpathWriter = 
+            new EclipseClasspathWriter( getLog(), eclipseProjectDir, project, artifacts );
+        
+        classpathWriter.setM2eclipse(m2eclipse);
+        classpathWriter.write( projectBaseDir,
                                                                                              reactorArtifacts,
                                                                                              sourceDirs,
                                                                                              classpathContainers,
@@ -450,6 +469,11 @@
 
         projectnatures.add( NATURE_JDT_CORE_JAVA );
 
+        if ( m2eclipse )
+        {
+            projectnatures.add( NATURE_M2ECLIPSE );
+        }
+
         if ( wtpR7 || wtp10 )
         {
             projectnatures.add( NATURE_WST_MODULE_CORE_NATURE ); // WTP 0.7/1.0 nature
@@ -462,6 +486,11 @@
     {
         classpathContainers = new ArrayList();
         classpathContainers.add( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER );
+
+        if ( m2eclipse )
+        {
+            classpathContainers.add( COMMON_PATH_M2ECLIPSE_CONTAINER );
+        }
     }
 
     private void fillDefaultBuilders( String packaging )
@@ -475,6 +504,11 @@
 
         buildcommands.add( BUILDER_JDT_CORE_JAVA );
 
+        if ( m2eclipse ) 
+        {
+            buildcommands.add( BUILDER_M2ECLIPSE );
+        }
+
         if ( wtpR7 || wtp10 )
         {
             buildcommands.add( BUILDER_WST_VALIDATION ); // WTP 0.7/1.0 builder
@@ -707,4 +741,12 @@
         this.wtpversion = wtpversion;
     }
 
+    public boolean getM2eclipse() {
+        return m2eclipse;
+    }
+    
+    public void setM2eclipse( boolean m2eclipse ) {
+        this.m2eclipse = m2eclipse;
+    }
+
 }

