jvanzyl     2004/04/16 06:56:09

  Modified:    maven-core bootstrap.sh
               maven-core/src/bin classworlds.conf
               maven-core/src/main/java/org/apache/maven Maven.java
                        MavenConstants.java
               maven-core/src/main/java/org/apache/maven/lifecycle
                        MavenLifecycleContext.java MavenLifecyclePhase.java
               maven-core/src/main/resources/META-INF/plexus components.xml
               maven-core/src/main/resources/org/apache/maven plexus.xml
               maven-core/src/test/java/org/apache/maven MavenTest.java
               maven-core/src/test/java/org/apache/maven/plugin
                        PluginTest.java
  Added:       maven-core/src/main/java/org/apache/maven
                        DefaultMavenCore.java MavenCli.java MavenCore.java
  Removed:     maven-core/src/main/java/org/apache/maven DefaultMaven.java
                        MavenCommandLineFrontEnd.java
  Log:
  o the start of working on a POJO facade that can be used for embedding maven
    in things like IDEs. This is exactly what I'm trying to do with these
    changes in order to give the Mevenide folks something to start using.
  
  Revision  Changes    Path
  1.6       +0 -2      maven-components/maven-core/bootstrap.sh
  
  Index: bootstrap.sh
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/bootstrap.sh,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- bootstrap.sh      12 Apr 2004 20:21:48 -0000      1.5
  +++ bootstrap.sh      16 Apr 2004 13:56:09 -0000      1.6
  @@ -8,8 +8,6 @@
   mkdir -p ${DIST}
   mkdir -p ${DIST}/bin
   mkdir -p ${DIST}/lib
  -mkdir -p ${DIST}/plugins/jelly
  -mkdir -p ${DIST}/plugins/java
   mkdir -p ${DIST}/plugins/plexus
   
   cp target/maven*.jar ${DIST}/lib
  
  
  
  1.3       +1 -1      maven-components/maven-core/src/bin/classworlds.conf
  
  Index: classworlds.conf
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/bin/classworlds.conf,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- classworlds.conf  7 Apr 2004 20:00:41 -0000       1.2
  +++ classworlds.conf  16 Apr 2004 13:56:09 -0000      1.3
  @@ -1,4 +1,4 @@
  -main is org.apache.maven.MavenCommandLineFrontEnd from root
  +main is org.apache.maven.MavenCli from root
   
   [root]
   load ${tools.jar}
  
  
  
  1.9       +88 -32    
maven-components/maven-core/src/main/java/org/apache/maven/Maven.java
  
  Index: Maven.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/Maven.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Maven.java        15 Apr 2004 14:40:30 -0000      1.8
  +++ Maven.java        16 Apr 2004 13:56:09 -0000      1.9
  @@ -16,70 +16,126 @@
    * limitations under the License.
    */
   
  -import org.apache.maven.plugin.descriptor.PluginDescriptor;
   import org.apache.maven.plugin.descriptor.GoalDescriptor;
  -import org.apache.maven.project.ProjectBuildingException;
  +import org.apache.maven.plugin.descriptor.PluginDescriptor;
   import org.apache.maven.project.MavenProject;
  +import org.apache.maven.project.ProjectBuildingException;
  +import org.codehaus.classworlds.ClassRealm;
  +import org.codehaus.classworlds.ClassWorld;
  +import org.codehaus.plexus.embed.Embedder;
  +import org.codehaus.plexus.util.FileUtils;
   
   import java.io.File;
  -import java.util.List;
  +import java.net.URL;
   import java.util.Map;
  +import java.util.List;
  +import java.util.Iterator;
   
   /**
  - *
  - *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
  - *
    * @version $Id$
    */
  -public interface Maven
  +public class Maven
  +    implements MavenCore
   {
  -    static String ROLE = Maven.class.getName();
  +    private MavenCore maven;
   
  -    // ----------------------------------------------------------------------
  -    // Execution
  -    // ----------------------------------------------------------------------
  +    public Maven( String mavenHome, ClassWorld classWorld )
  +        throws Exception
  +    {
  +        Embedder embedder = new Embedder();
  +
  +        URL url = Maven.class.getResource( "plexus.xml" );
  +
  +        embedder.setConfiguration( url );
  +
  +        ClassRealm realm = classWorld.getRealm( "root" );
  +
  +        embedder.setClassLoader( realm.getClassLoader() );
  +
  +        embedder.addContextValue( "rootClassRealm", realm );
   
  -    void execute( String goal )
  -        throws GoalNotFoundException;
  +        embedder.addContextValue( "maven.home", mavenHome );
   
  -    void execute( MavenProject project, String goal )
  -        throws GoalNotFoundException;
  +        embedder.start();
   
  -    void execute( File project, String goal )
  -        throws ProjectBuildingException,GoalNotFoundException;
  +        maven = (MavenCore) embedder.lookup( MavenCore.ROLE );
  +    }
  +
  +    public void execute( String goal )
  +        throws GoalNotFoundException
  +    {
  +        maven.execute( (MavenProject) null, goal );
  +    }
  +
  +    public void execute( File projectFile, String goal )
  +        throws ProjectBuildingException,GoalNotFoundException
  +    {
  +        maven.execute( getProject( projectFile ), goal );
  +    }
  +
  +    public void execute( MavenProject project, String goal )
  +        throws GoalNotFoundException
  +    {
  +        maven.execute( project, goal );
  +    }
   
       // ----------------------------------------------------------------------
       // Plugin descriptors
       // ----------------------------------------------------------------------
   
  -    Map getPluginDescriptors();
  +    public Map getPluginDescriptors()
  +    {
   
  -    PluginDescriptor getPluginDescriptor( String pluginId );
  +        return maven.getPluginDescriptors();
  +    }
  +
  +    public PluginDescriptor getPluginDescriptor( String pluginId )
  +    {
  +        return maven.getPluginDescriptor( pluginId );
  +    }
   
       // ----------------------------------------------------------------------
       // Goal descriptors
       // ----------------------------------------------------------------------
   
  -    Map getGoalDescriptors();
  -
  -    GoalDescriptor getGoalDescriptor( String goalId );
  +    public Map getGoalDescriptors()
  +    {
  +        return maven.getGoalDescriptors();
  +    }
  +
  +    public GoalDescriptor getGoalDescriptor( String goalId )
  +    {
  +        return maven.getGoalDescriptor( goalId );
  +    }
   
       // ----------------------------------------------------------------------
  -    // Maven home
  +    // Project building
       // ----------------------------------------------------------------------
   
  -    void setMavenHome( String mavenHome );
  +    public MavenProject getProject( File project )
  +        throws ProjectBuildingException
  +    {
  +        return maven.getProject( project );
  +    }
   
  -    String getMavenHome();
  +    public MavenProject getProject( File project, boolean useParent )
  +        throws ProjectBuildingException
  +    {
  +        return maven.getProject( project, useParent );
  +    }
   
       // ----------------------------------------------------------------------
  -    // Maven project handling
  +    // Maven home
       // ----------------------------------------------------------------------
   
  -    public MavenProject getProject( File project )
  -        throws ProjectBuildingException;
  -
  -    public MavenProject getProject( File project, boolean useParent )
  -        throws ProjectBuildingException;
  +    public void setMavenHome( String mavenHome )
  +    {
  +        maven.setMavenHome( mavenHome );
  +    }
  +
  +    public String getMavenHome()
  +    {
  +        return maven.getMavenHome();
  +    }
   }
  
  
  
  1.6       +1 -1      
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MavenConstants.java       5 Apr 2004 17:09:49 -0000       1.5
  +++ MavenConstants.java       16 Apr 2004 13:56:09 -0000      1.6
  @@ -24,5 +24,5 @@
   
       public static final String DEBUG_ON = "maven.debugOn";
   
  -    public static final String MAVEN_HOME = "maven.home";
  +    public static final String MAVEN_HOME = "m2.home";
   }
  
  
  
  1.1                  
maven-components/maven-core/src/main/java/org/apache/maven/DefaultMavenCore.java
  
  Index: DefaultMavenCore.java
  ===================================================================
  package org.apache.maven;
  
  /*
   * Copyright 2001-2004 The Apache Software Foundation.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  import org.apache.maven.lifecycle.MavenLifecycleContext;
  import org.apache.maven.lifecycle.MavenLifecycleManager;
  import org.apache.maven.plugin.descriptor.GoalDescriptor;
  import org.apache.maven.plugin.descriptor.PluginDescriptor;
  import org.apache.maven.plugin.manager.PluginManagerManager;
  import org.apache.maven.project.MavenProject;
  import org.apache.maven.project.MavenProjectBuilder;
  import org.apache.maven.project.ProjectBuildingException;
  import org.codehaus.plexus.PlexusConstants;
  import org.codehaus.plexus.PlexusContainer;
  import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
  import org.codehaus.plexus.context.Context;
  import org.codehaus.plexus.context.ContextException;
  import org.codehaus.plexus.i18n.I18N;
  
  import java.io.File;
  import java.util.List;
  import java.util.Map;
  
  public class DefaultMavenCore
      implements MavenCore, Contextualizable
  {
      // ----------------------------------------------------------------------
      //
      // ----------------------------------------------------------------------
  
      private PlexusContainer container;
  
      private String mavenHome;
  
      // ----------------------------------------------------------------------
      // Components
      // ----------------------------------------------------------------------
  
      private PluginManagerManager pluginManagerManager;
  
      private MavenLifecycleManager lifecycleManager;
  
      private MavenProjectBuilder projectBuilder;
  
      private I18N i18n;
  
      // ----------------------------------------------------------------------
      // Goal attainment
      // ----------------------------------------------------------------------
  
      public void execute( String goal )
          throws GoalNotFoundException
      {
          execute( (MavenProject) null, goal );
      }
  
      public void execute( File projectFile, String goal )
          throws ProjectBuildingException,GoalNotFoundException
      {
          execute( getProject( projectFile ), goal );
      }
  
      public void execute( MavenProject project, String goal )
          throws GoalNotFoundException
      {
          if ( !getGoalDescriptors().containsKey( goal ) )
          {
              throw new GoalNotFoundException( goal );
          }
  
          try
          {
              lifecycleManager.execute( new MavenLifecycleContext( container, project, 
goal ) );
          }
          catch ( Exception e )
          {
              e.printStackTrace();
          }
      }
  
      // ----------------------------------------------------------------------
      // Plugin descriptors
      // ----------------------------------------------------------------------
  
      public Map getPluginDescriptors()
      {
          return pluginManagerManager.getPluginDescriptors();
      }
  
      public PluginDescriptor getPluginDescriptor( String pluginId )
      {
          return pluginManagerManager.getPluginDescriptor( pluginId );
      }
  
      // ----------------------------------------------------------------------
      // Goal descriptors
      // ----------------------------------------------------------------------
  
      public Map getGoalDescriptors()
      {
          return pluginManagerManager.getGoalDescriptors();
      }
  
      public GoalDescriptor getGoalDescriptor( String goalId )
      {
          return pluginManagerManager.getGoalDescriptor( goalId );
      }
  
      // ----------------------------------------------------------------------
      // Project building
      // ----------------------------------------------------------------------
  
      public MavenProject getProject( File project )
          throws ProjectBuildingException
      {
          return getProject( project, true );
      }
  
      public MavenProject getProject( File project, boolean useParent )
          throws ProjectBuildingException
      {
          if ( project.exists() )
          {
              if ( project.length() == 0 )
              {
                  throw new ProjectBuildingException( i18n.format( 
"empty.descriptor.error", project.getName() ) );
              }
          }
  
          return projectBuilder.build( project, useParent );
      }
  
      // ----------------------------------------------------------------------
      // Reactor
      // ----------------------------------------------------------------------
  
      public List getSortedProjects( List projects )
          throws Exception
      {
          return projectBuilder.getSortedProjects( projects );
      }
  
      // ----------------------------------------------------------------------
      // Maven home
      // ----------------------------------------------------------------------
  
      public void setMavenHome( String mavenHome )
      {
          this.mavenHome = mavenHome;
      }
  
      public String getMavenHome()
      {
          if ( mavenHome == null )
          {
              mavenHome = System.getProperty( MavenConstants.MAVEN_HOME );
          }
  
          return mavenHome;
      }
  
      // ----------------------------------------------------------------------
      // Lifecylce Management
      // ----------------------------------------------------------------------
  
      public void contextualize( Context context )
          throws ContextException
      {
          container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
      }
  }
  
  
  
  
  1.1                  
maven-components/maven-core/src/main/java/org/apache/maven/MavenCli.java
  
  Index: MavenCli.java
  ===================================================================
  package org.apache.maven;
  
  /*
   * Copyright 2001-2004 The Apache Software Foundation.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  import org.apache.commons.cli.CommandLine;
  import org.apache.commons.cli.CommandLineParser;
  import org.apache.commons.cli.HelpFormatter;
  import org.apache.commons.cli.OptionBuilder;
  import org.apache.commons.cli.Options;
  import org.apache.commons.cli.ParseException;
  import org.apache.commons.cli.PosixParser;
  import org.codehaus.classworlds.ClassWorld;
  
  import java.io.File;
  import java.util.Iterator;
  
  /**
   * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
   * @version $Id: MavenCli.java,v 1.1 2004/04/16 13:56:09 jvanzyl Exp $
   */
  public class MavenCli
  {
      public static final String POM_FILE_NAME = "project.xml";
  
      private static final String WORK_OFFLINE = "o";
  
      private static final String SET_SYSTEM_PROPERTY = "D";
  
      private static final String DEBUG = "X";
  
      public static void main( String[] args, ClassWorld classWorld )
          throws Exception
      {
          CLIManager cliManager = new CLIManager();
  
          CommandLine commandLine = cliManager.parse( args );
  
          initializeSystemProperties( commandLine );
  
          Maven maven = new Maven( System.getProperty( "maven.home" ), classWorld );
  
          File projectFile = new File( System.getProperty( "user.dir" ), POM_FILE_NAME 
);
  
          for ( Iterator i = commandLine.getArgList().iterator(); i.hasNext(); )
          {
              maven.execute( projectFile, (String) i.next() );
          }
      }
  
      public static void initializeSystemProperties( CommandLine commandLine )
      {
          // Options that are set on the command line become system properties
          // and therefore are set in the session properties. System properties
          // are most dominant.
  
          if ( commandLine.hasOption( DEBUG ) )
          {
              System.setProperty( MavenConstants.DEBUG_ON, "true" );
          }
          else
          {
              System.setProperty( MavenConstants.DEBUG_ON, "false" );
          }
  
          if ( commandLine.hasOption( WORK_OFFLINE ) )
          {
              System.setProperty( "maven.mode.online", "false" );
          }
          else
          {
              System.setProperty( "maven.mode.online", "true" );
          }
  
          if ( commandLine.hasOption( SET_SYSTEM_PROPERTY ) )
          {
              String[] defStrs = commandLine.getOptionValues( SET_SYSTEM_PROPERTY );
  
              for ( int i = 0; i < defStrs.length; ++i )
              {
                  setCliProperty( defStrs[i] );
              }
          }
      }
  
      private static void setCliProperty( String property )
      {
          String name = null;
  
          String value = null;
  
          int i = property.indexOf( "=" );
  
          if ( i <= 0 )
          {
              name = property.trim();
  
              value = "true";
          }
          else
          {
              name = property.substring( 0, i ).trim();
  
              value = property.substring( i + 1 ).trim();
          }
  
          System.setProperty( name, value );
      }
  
      static class CLIManager
      {
          private Options options = null;
  
          CLIManager()
          {
              options = new Options();
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "nobanner" )
                                 .withDescription( "Suppress logo banner" )
                                 .create( 'b' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "define" )
                                 .hasArg()
                                 .withDescription( "Define a system property" )
                                 .create( 'D' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "dir" )
                                 .hasArg()
                                 .withDescription( "Set effective working directory" )
                                 .create( 'd' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "exception" )
                                 .withDescription( "Produce exception stack traces" )
                                 .create( 'e' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "goalDescriptors" )
                                 .withDescription( "Display available goalDescriptors" 
)
                                 .create( 'g' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "help" )
                                 .withDescription( "Display help information" )
                                 .create( 'h' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "offline" )
                                 .withDescription( "Build is happening offline" )
                                 .create( 'o' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "version" )
                                 .withDescription( "Display version information" )
                                 .create( 'v' ) );
  
              options.addOption( OptionBuilder
                                 .withLongOpt( "debug" )
                                 .withDescription( "Produce execution debug output" )
                                 .create( 'X' ) );
          }
  
          public CommandLine parse( String[] args ) throws ParseException
          {
              CommandLineParser parser = new PosixParser();
  
              return parser.parse( options, args );
          }
  
          public void displayHelp()
          {
              HelpFormatter formatter = new HelpFormatter();
  
              formatter.printHelp( "maven [options] [goal [goal2 [goal3] ...]]", 
"\nOptions:", options, "\n" );
  
          }
      }
  }
  
  
  
  1.1                  
maven-components/maven-core/src/main/java/org/apache/maven/MavenCore.java
  
  Index: MavenCore.java
  ===================================================================
  package org.apache.maven;
  
  /*
   * Copyright 2001-2004 The Apache Software Foundation.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  import org.apache.maven.plugin.descriptor.PluginDescriptor;
  import org.apache.maven.plugin.descriptor.GoalDescriptor;
  import org.apache.maven.project.ProjectBuildingException;
  import org.apache.maven.project.MavenProject;
  
  import java.io.File;
  import java.util.List;
  import java.util.Map;
  
  /**
   *
   *
   * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
   *
   * @version $Id: MavenCore.java,v 1.1 2004/04/16 13:56:09 jvanzyl Exp $
   */
  public interface MavenCore
  {
      static String ROLE = MavenCore.class.getName();
  
      // ----------------------------------------------------------------------
      // Execution
      // ----------------------------------------------------------------------
  
      void execute( String goal )
          throws GoalNotFoundException;
  
      void execute( MavenProject project, String goal )
          throws GoalNotFoundException;
  
      void execute( File project, String goal )
          throws ProjectBuildingException,GoalNotFoundException;
  
      // ----------------------------------------------------------------------
      // Plugin descriptors
      // ----------------------------------------------------------------------
  
      Map getPluginDescriptors();
  
      PluginDescriptor getPluginDescriptor( String pluginId );
  
      // ----------------------------------------------------------------------
      // Goal descriptors
      // ----------------------------------------------------------------------
  
      Map getGoalDescriptors();
  
      GoalDescriptor getGoalDescriptor( String goalId );
  
      // ----------------------------------------------------------------------
      // Maven home
      // ----------------------------------------------------------------------
  
      void setMavenHome( String mavenHome );
  
      String getMavenHome();
  
      // ----------------------------------------------------------------------
      // Maven project handling
      // ----------------------------------------------------------------------
  
      public MavenProject getProject( File project )
          throws ProjectBuildingException;
  
      public MavenProject getProject( File project, boolean useParent )
          throws ProjectBuildingException;
  }
  
  
  
  1.5       +2 -2      
maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/MavenLifecycleContext.java
  
  Index: MavenLifecycleContext.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/MavenLifecycleContext.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MavenLifecycleContext.java        5 Apr 2004 16:58:21 -0000       1.4
  +++ MavenLifecycleContext.java        16 Apr 2004 13:56:09 -0000      1.5
  @@ -1,6 +1,6 @@
   package org.apache.maven.lifecycle;
   
  -import org.apache.maven.Maven;
  +import org.apache.maven.MavenCore;
   import org.apache.maven.project.MavenProject;
   import org.codehaus.plexus.PlexusContainer;
   
  
  
  
  1.4       +2 -2      
maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/MavenLifecyclePhase.java
  
  Index: MavenLifecyclePhase.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/MavenLifecyclePhase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MavenLifecyclePhase.java  5 Apr 2004 16:01:31 -0000       1.3
  +++ MavenLifecyclePhase.java  16 Apr 2004 13:56:09 -0000      1.4
  @@ -1,6 +1,6 @@
   package org.apache.maven.lifecycle;
   
  -import org.apache.maven.Maven;
  +import org.apache.maven.MavenCore;
   
   /**
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
  
  
  
  1.2       +2 -14     
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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- components.xml    15 Apr 2004 15:49:18 -0000      1.1
  +++ components.xml    16 Apr 2004 13:56:09 -0000      1.2
  @@ -1,8 +1,8 @@
   <component-set>
     <components>
       <component>
  -      <role>org.apache.maven.Maven</role>
  -      <implementation>org.apache.maven.DefaultMaven</implementation>
  +      <role>org.apache.maven.MavenCore</role>
  +      <implementation>org.apache.maven.DefaultMavenCore</implementation>
         <requirements>
           <requirement>
             <role>org.apache.maven.plugin.manager.PluginManagerManager</role>
  @@ -24,18 +24,6 @@
         <configuration>
           
<default-bundle-name>org.apache.maven.messages.messages</default-bundle-name>
         </configuration>
  -    </component>
  -    <component>
  -      <role>org.apache.maven.verifier.DependencyVerifier</role>
  -      
<implementation>org.apache.maven.verifier.DefaultDependencyVerifier</implementation>
  -      <requirements>
  -        <requirement>
  -          <role>org.codehaus.plexus.i18n.I18N</role>
  -        </requirement>
  -        <requirement>
  -          <role>org.apache.maven.wagon.managers.WagonManager</role>
  -        </requirement>
  -      </requirements>
       </component>
       <component>
         <role>org.apache.maven.lifecycle.MavenLifecycleManager</role>
  
  
  
  1.9       +0 -10     
maven-components/maven-core/src/main/resources/org/apache/maven/plexus.xml
  
  Index: plexus.xml
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-core/src/main/resources/org/apache/maven/plexus.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- plexus.xml        15 Apr 2004 15:49:19 -0000      1.8
  +++ plexus.xml        16 Apr 2004 13:56:09 -0000      1.9
  @@ -51,15 +51,5 @@
         <role-hint>integrated</role-hint>
         
<implementation>org.apache.maven.plugin.plexus.executor.IntegratedPluginExecutor</implementation>
       </component>
  -    <component>
  -      <role>org.apache.maven.wagon.managers.WagonManager</role>
  -      
<implementation>org.apache.maven.wagon.managers.DefaultWagonManager</implementation>
  -      <requirements>
  -        <requirement>
  -          <role>org.apache.maven.wagon.Wagon</role>
  -          <field-name>wagons</field-name>
  -        </requirement>
  -      </requirements>
  -    </component>
     </components>
   </configuration>
  
  
  
  1.3       +2 -2      
maven-components/maven-core/src/test/java/org/apache/maven/MavenTest.java
  
  Index: MavenTest.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-core/src/test/java/org/apache/maven/MavenTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MavenTest.java    21 Mar 2004 00:33:18 -0000      1.2
  +++ MavenTest.java    16 Apr 2004 13:56:09 -0000      1.3
  @@ -38,7 +38,7 @@
       public void testMaven()
           throws Exception
       {
  -        Maven maven = (Maven) lookup( Maven.ROLE );
  +        MavenCore maven = (MavenCore) lookup( MavenCore.ROLE );
   
           assertNotNull( maven );
       }
  
  
  
  1.5       +6 -6      
maven-components/maven-core/src/test/java/org/apache/maven/plugin/PluginTest.java
  
  Index: PluginTest.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-core/src/test/java/org/apache/maven/plugin/PluginTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PluginTest.java   5 Apr 2004 16:28:25 -0000       1.4
  +++ PluginTest.java   16 Apr 2004 13:56:09 -0000      1.5
  @@ -16,7 +16,7 @@
    * limitations under the License.
    */
   
  -import org.apache.maven.Maven;
  +import org.apache.maven.MavenCore;
   import org.apache.maven.MavenPlexusComponentTestBase;
   import org.apache.maven.plugin.descriptor.PluginDescriptor;
   import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
  @@ -70,7 +70,7 @@
       {
           registerPlugin( "integrated-plugin.xml" );
   
  -        Maven maven = (Maven) lookup( Maven.ROLE );
  +        MavenCore maven = (MavenCore) lookup( MavenCore.ROLE );
   
           maven.execute( new File( System.getProperty( "user.dir"), "project.xml" ), 
"integrated-execute" );
   
  @@ -90,7 +90,7 @@
       {
           registerPlugin( "singleton-plugin.xml" );
   
  -        Maven maven = (Maven) lookup( Maven.ROLE );
  +        MavenCore maven = (MavenCore) lookup( MavenCore.ROLE );
   
           maven.execute( new File( System.getProperty( "user.dir"), "project.xml" ), 
"singleton-execute" );
   
  @@ -110,7 +110,7 @@
       {
           registerPlugin( "setter-plugin.xml" );
   
  -        Maven maven = (Maven) lookup( Maven.ROLE );
  +        MavenCore maven = (MavenCore) lookup( MavenCore.ROLE );
   
           maven.execute( new File( System.getProperty( "user.dir"), "project.xml" ), 
"setter-execute" );
   
  @@ -133,7 +133,7 @@
       {
           registerPlugin( "field-plugin.xml" );
   
  -        Maven maven = (Maven) lookup( Maven.ROLE );
  +        MavenCore maven = (MavenCore) lookup( MavenCore.ROLE );
   
           maven.execute( new File( System.getProperty( "user.dir"), "project.xml" ), 
"field-execute" );
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to