You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by jv...@apache.org on 2004/07/02 04:23:30 UTC

cvs commit: maven-components/maven-core/src/main/resources/META-INF/plexus components.xml plexus.xml

jvanzyl     2004/07/01 19:23:30

  Modified:    maven-core/src/main/java/org/apache/maven MavenCli.java
                        MavenConstants.java
               maven-core/src/main/java/org/apache/maven/lifecycle/phase
                        DependencyResolutionPhase.java
               maven-core/src/main/java/org/apache/maven/plugin
                        DefaultPluginManager.java
               maven-core/src/main/resources/META-INF/plexus components.xml
                        plexus.xml
  Log:
  o we can turn off the plugin processing phases until we make some changes
    to plexus to deal with dynamically added components.
  
  Revision  Changes    Path
  1.7       +7 -12     maven-components/maven-core/src/main/java/org/apache/maven/MavenCli.java
  
  Index: MavenCli.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/MavenCli.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MavenCli.java	30 Jun 2004 22:03:36 -0000	1.6
  +++ MavenCli.java	2 Jul 2004 02:23:30 -0000	1.7
  @@ -177,11 +177,11 @@
   
           if ( commandLine.hasOption( CLIManager.WORK_OFFLINE ) )
           {
  -            System.setProperty( "maven.mode.online", "false" );
  +            System.setProperty( MavenConstants.WORK_OFFLINE, "true" );
           }
           else
           {
  -            System.setProperty( "maven.mode.online", "true" );
  +            System.setProperty( MavenConstants.WORK_OFFLINE, "false" );
           }
   
           if ( commandLine.hasOption( CLIManager.SET_SYSTEM_PROPERTY ) )
  @@ -253,18 +253,13 @@
                                  .hasArg()
                                  .withDescription( "Define a system property" )
                                  .create( SET_SYSTEM_PROPERTY ) );
  -/*
  +
               options.addOption( OptionBuilder
  -                               .withLongOpt( "dir" )
  +                               .withLongOpt( "offline" )
                                  .hasArg()
  -                               .withDescription( "Set effective working directory" )
  -                               .create( 'd' ) );
  +                               .withDescription( "Work offline" )
  +                               .create( WORK_OFFLINE ) );
   
  -            options.addOption( OptionBuilder
  -                               .withLongOpt( "exception" )
  -                               .withDescription( "Produce exception stack traces" )
  -                               .create( 'e' ) );
  -*/
               options.addOption( OptionBuilder
                                  .withLongOpt( "mojoDescriptors" )
                                  .withDescription( "Display available mojoDescriptors" )
  
  
  
  1.3       +2 -0      maven-components/maven-core/src/main/java/org/apache/maven/MavenConstants.java
  
  Index: MavenConstants.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/MavenConstants.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MavenConstants.java	17 Jun 2004 19:38:50 -0000	1.2
  +++ MavenConstants.java	2 Jul 2004 02:23:30 -0000	1.3
  @@ -24,6 +24,8 @@
   
       public static final String DEBUG_ON = "maven.debugOn";
   
  +    public static final String WORK_OFFLINE = "maven.workOffline";
  +
       public static final String MAVEN_HOME = "m2.home";
   
       public static final String MAVEN_REPO_LOCAL = "maven.repo.local";
  
  
  
  1.9       +1 -2      maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/phase/DependencyResolutionPhase.java
  
  Index: DependencyResolutionPhase.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/phase/DependencyResolutionPhase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DependencyResolutionPhase.java	27 Jun 2004 17:02:17 -0000	1.8
  +++ DependencyResolutionPhase.java	2 Jul 2004 02:23:30 -0000	1.9
  @@ -72,7 +72,6 @@
               context.release(  artifactCollector );
   
               context.release(  builder );
  -
           }
       }
   }
  
  
  
  1.10      +9 -42     maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
  
  Index: DefaultPluginManager.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultPluginManager.java	27 Jun 2004 07:39:08 -0000	1.9
  +++ DefaultPluginManager.java	2 Jul 2004 02:23:30 -0000	1.10
  @@ -16,39 +16,29 @@
    * limitations under the License.
    */
   
  -import java.util.HashMap;
  -import java.util.Iterator;
  -import java.util.List;
  -import java.util.Map;
  -
   import org.apache.maven.plugin.descriptor.MojoDescriptor;
   import org.apache.maven.plugin.descriptor.PluginDescriptor;
   import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
  -
  -import org.codehaus.plexus.PlexusConstants;
  -import org.codehaus.plexus.PlexusContainer;
   import org.codehaus.plexus.component.discovery.ComponentDiscoveryEvent;
   import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener;
   import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
  -import org.codehaus.plexus.context.Context;
  -import org.codehaus.plexus.context.ContextException;
   import org.codehaus.plexus.logging.AbstractLogEnabled;
  -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
   import org.codehaus.plexus.util.dag.CycleDetectedException;
   import org.codehaus.plexus.util.dag.DAG;
   import org.codehaus.plexus.util.dag.TopologicalSorter;
   
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.List;
  +import java.util.Map;
  +
   public class DefaultPluginManager
       extends AbstractLogEnabled
  -    implements PluginManager, ComponentDiscoveryListener, Contextualizable
  +    implements PluginManager, ComponentDiscoveryListener
   {
       static String MAVEN_PLUGIN = "maven-plugin";
   
  -    private PlexusContainer container;
  -
  -    protected String mavenHome;
  -
  -    protected DAG dag = new DAG();
  +    protected DAG dag;
   
       protected Map mojoDescriptors;
   
  @@ -60,6 +50,8 @@
   
       public DefaultPluginManager()
       {
  +        dag = new DAG();
  +
           mojoDescriptors = new HashMap();
   
           goalToPluginMap = new HashMap();
  @@ -157,22 +149,7 @@
           }
   
           MavenPluginDescriptor pluginDescriptor = (MavenPluginDescriptor) componentSetDescriptor;
  -/*
  -        for ( Iterator it = componentSetDescriptor.getComponents().iterator(); it.hasNext(); )
  -        {
  -            ComponentDescriptor componentDescriptor = (ComponentDescriptor) it.next();
  -
  -            if ( componentDescriptor.getComponentType().equals( MAVEN_PLUGIN ) )
  -            {
  -                // What is coming back here is a subclass of a plexus component descriptor
   
  -                // So are the use of PluginDescriptor and MavenPluginDescriptor needed?
  -                // What is the relationship?
  -
  -                pluginDescriptor.getMavenMojoDescriptors().add( componentDescriptor );
  -            }
  -        }
  -*/
           try
           {
               processPluginDescriptor( pluginDescriptor );
  @@ -181,15 +158,5 @@
           {
               getLogger().error( "A cycle was detected in the goal graph: ", e );
           }
  -    }
  -
  -    // ----------------------------------------------------------------------
  -    // Lifecycle
  -    // ----------------------------------------------------------------------
  -
  -    public void contextualize( Context context )
  -        throws ContextException
  -    {
  -        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
       }
   }
  
  
  
  1.4       +2 -0      maven-components/maven-core/src/main/resources/META-INF/plexus/components.xml
  
  Index: components.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/resources/META-INF/plexus/components.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- components.xml	1 Jul 2004 01:55:43 -0000	1.3
  +++ components.xml	2 Jul 2004 02:23:30 -0000	1.4
  @@ -32,9 +32,11 @@
           <lifecycle-phases>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.GoalDecorationPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.GoalResolutionPhase"/>
  +          <!--
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.PluginDownloadPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.PluginDependencyResolutionPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.PluginDependencyDownloadPhase"/>
  +          -->
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.DependencyResolutionPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.DependencyDownloadPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.GoalAttainmentPhase"/>
  
  
  
  1.2       +0 -3      maven-components/maven-core/src/main/resources/META-INF/plexus/plexus.xml
  
  Index: plexus.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/resources/META-INF/plexus/plexus.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plexus.xml	1 Jul 2004 01:55:43 -0000	1.1
  +++ plexus.xml	2 Jul 2004 02:23:30 -0000	1.2
  @@ -16,9 +16,6 @@
       <component>
         <role>org.apache.maven.plugin.PluginManager</role>
         <implementation>org.apache.maven.plugin.DefaultPluginManager</implementation>
  -      <configuration>
  -        <maven-home>${maven.home}</maven-home>
  -      </configuration>
       </component>
     </components>
   </plexus>