Coverage Report - org.apache.maven.plugin.eclipse.M2EclipseMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
M2EclipseMojo
0%
0/13
0%
0/4
3
 
 1  
 package org.apache.maven.plugin.eclipse;
 2  
 
 3  
 import java.util.ArrayList;
 4  
 import java.util.Collections;
 5  
 import java.util.List;
 6  
 
 7  
 import org.apache.maven.plugin.MojoExecutionException;
 8  
 
 9  
 /**
 10  
  * Creates an eclipse project that is ready to use with the M2Elipse plugin.
 11  
  * 
 12  
  * @goal m2eclipse
 13  
  * @execute phase="generate-resources"
 14  
  * @since 2.4
 15  
  */
 16  0
 public class M2EclipseMojo
 17  
     extends EclipsePlugin
 18  
 {
 19  
 
 20  
     protected static final String M2ECLIPSE_NATURE = "org.maven.ide.eclipse.maven2Nature";
 21  
 
 22  
     protected static final String M2ECLIPSE_BUILD_COMMAND = "org.maven.ide.eclipse.maven2Builder";
 23  
 
 24  
     protected static final String M2ECLIPSE_CLASSPATH_CONTAINER = "org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER";
 25  
 
 26  
     protected void setupExtras()
 27  
         throws MojoExecutionException
 28  
     {
 29  
         // disable normal dependency resolution; the m2eclipse plugin will handle it.
 30  0
         setResolveDependencies( false );
 31  
 
 32  0
         setAdditionalProjectnatures( new ArrayList( Collections.singletonList( M2ECLIPSE_NATURE ) ) );
 33  0
         setAdditionalBuildcommands( new ArrayList( Collections.singletonList( M2ECLIPSE_BUILD_COMMAND ) ) );
 34  
 
 35  0
         List classpathContainers = getClasspathContainers();
 36  0
         if ( classpathContainers == null )
 37  
         {
 38  0
             classpathContainers = new ArrayList();
 39  
 
 40  0
             classpathContainers.add( COMMON_PATH_JDT_LAUNCHING_JRE_CONTAINER );
 41  
 
 42  0
             if ( isPdeProject() )
 43  
             {
 44  0
                 classpathContainers.add( REQUIRED_PLUGINS_CONTAINER );
 45  
             }
 46  
         }
 47  
 
 48  0
         classpathContainers.add( M2ECLIPSE_CLASSPATH_CONTAINER );
 49  
 
 50  0
         setClasspathContainers( classpathContainers );
 51  0
     }
 52  
 
 53  
 }