maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r701085 [3/3] - in /maven/components/branches/maven-3.0.x-lifecycle: ./ maven-core/ maven-core/src/main/java/org/apache/maven/ maven-core/src/main/java/org/apache/maven/errors/ maven-core/src/main/java/org/apache/maven/execution/ maven-core...
Date Thu, 02 Oct 2008 11:26:37 GMT
Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java
Thu Oct  2 04:26:35 2008
@@ -1,13 +1,5 @@
 package org.apache.maven.lifecycle;
 
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.plugin.PluginConfigurationException;
-import org.apache.maven.plugin.PluginManagerException;
-import org.apache.maven.plugin.loader.PluginLoaderException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.artifact.InvalidDependencyVersionException;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -28,79 +20,24 @@
  */
 
 /**
- * @author Jason van Zyl
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
  */
 public class LifecycleExecutionException
     extends Exception
 {
-    private final MavenProject project;
-
-    public LifecycleExecutionException( String message, MavenProject project )
+    public LifecycleExecutionException( String message )
     {
         super( message );
-        this.project = project;
-    }
-
-    public LifecycleExecutionException( String message, MavenProject project,
-                                        PluginManagerException cause )
-    {
-        super( message, cause );
-        this.project = project;
-    }
-
-    public LifecycleExecutionException( String message, MavenProject project,
-                                        ArtifactNotFoundException cause )
-    {
-        super( message, cause );
-        this.project = project;
-    }
-
-    public LifecycleExecutionException( String message, MavenProject project,
-                                        ArtifactResolutionException cause )
-    {
-        super( message, cause );
-        this.project = project;
     }
 
-    public LifecycleExecutionException( String message,
-                                        MavenProject project, PluginLoaderException cause
)
+    public LifecycleExecutionException( Throwable cause )
     {
-        super( message, cause );
-        this.project = project;
+        super( cause );
     }
 
-    public LifecycleExecutionException( String message,
-                                        MavenProject project, LifecycleException cause )
+    public LifecycleExecutionException( String message, Throwable cause )
     {
         super( message, cause );
-        this.project = project;
     }
-
-    public LifecycleExecutionException( String message, MavenProject project,
-                                        InvalidDependencyVersionException cause )
-    {
-        super( message, cause );
-        this.project = project;
-    }
-
-    public LifecycleExecutionException( String message, MavenProject project,
-                                        PluginConfigurationException cause )
-    {
-        super( message, cause );
-        this.project = project;
-    }
-
-    public LifecycleExecutionException( String message,
-                                        Throwable cause )
-    {
-        super( message, cause );
-        project = null;
-    }
-
-    public MavenProject getProject()
-    {
-        return project;
-    }
-
 }

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutor.java
Thu Oct  2 04:26:35 2008
@@ -22,39 +22,19 @@
 import java.util.List;
 
 import org.apache.maven.BuildFailureException;
-import org.apache.maven.execution.MavenExecutionRequest;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.execution.ReactorManager;
 import org.apache.maven.monitor.event.EventDispatcher;
 import org.apache.maven.project.MavenProject;
 
 /**
- * Responsible for orchestrating the process of building the ordered list of
- * steps required to achieve the specified set of tasks passed into Maven, then
- * executing these mojos in order. This class also manages the various error messages
- * that may occur during this process, and directing the behavior of the build
- * according to what's specified in {@link MavenExecutionRequest#getReactorFailureBehavior()}.
- *
- * @author Jason van Zyl
- * @author jdcasey
+ * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
  */
 public interface LifecycleExecutor
 {
     String ROLE = LifecycleExecutor.class.getName();
 
-    /**
-     * Provides a fail-fast way to check that all goals specified in {@link MavenExecutionRequest#getGoals()}
-     * or {@link MavenSession#getGoals()} is valid.
-     */
-    TaskValidationResult isTaskValid( String task, MavenSession session, MavenProject rootProject
);
-
-    /**
-     * Order and execute mojos associated with the current set of projects in the
-     * reactor. Specific lifecycle phases and mojo invocations that determine what
-     * phases and mojos this method will attempt to execute are provided in {@link MavenSession#getGoals()},
-     * which is populated from {@link MavenExecutionRequest#getGoals()}.
-     */
     void execute( MavenSession session, ReactorManager rm, EventDispatcher dispatcher )
         throws LifecycleExecutionException, BuildFailureException;
 
@@ -62,5 +42,6 @@
      * @since 2.0.10
      */
     List getLifecycles();
-
+    
+    TaskValidationResult isTaskValid( String goal, MavenSession session, MavenProject project
);
 }

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
Thu Oct  2 04:26:35 2008
@@ -40,7 +40,6 @@
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.execution.RuntimeInformation;
-import org.apache.maven.lifecycle.statemgmt.StateManagementUtils;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.model.Model;
@@ -107,17 +106,6 @@
     extends AbstractLogEnabled
     implements PluginManager, Contextualizable
 {
-    private static final List RESERVED_GROUP_IDS;
-
-    static
-    {
-        List rgids = new ArrayList();
-
-        rgids.add( StateManagementUtils.GROUP_ID );
-
-        RESERVED_GROUP_IDS = rgids;
-    }
-
     protected MutablePlexusContainer container;
 
     protected PluginDescriptorBuilder pluginDescriptorBuilder;
@@ -213,7 +201,7 @@
         try
         {
             // if the groupId is internal, don't try to resolve it...
-            if ( !RESERVED_GROUP_IDS.contains( plugin.getGroupId() ) )
+            if ( !"NOTHING".contains( plugin.getGroupId() ) )
             {
                 Artifact pluginArtifact = pluginManagerSupport.resolvePluginArtifact( plugin,
project, session );
 

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/DefaultPluginLoader.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/DefaultPluginLoader.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/DefaultPluginLoader.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/DefaultPluginLoader.java
Thu Oct  2 04:26:35 2008
@@ -4,7 +4,6 @@
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.execution.MavenSession;
-import org.apache.maven.lifecycle.model.MojoBinding;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.plugin.InvalidPluginException;
@@ -35,34 +34,6 @@
     private PluginManager pluginManager;
 
     /**
-     * Load the {@link PluginDescriptor} instance for the plugin implied by the specified
MojoBinding,
-     * using the project for {@link ArtifactRepository} and other supplemental plugin information
as
-     * necessary.
-     */
-    public PluginDescriptor loadPlugin( MojoBinding mojoBinding, MavenProject project, MavenSession
session )
-        throws PluginLoaderException
-    {
-        PluginDescriptor pluginDescriptor = null;
-
-        Plugin plugin = new Plugin();
-        plugin.setGroupId( mojoBinding.getGroupId() );
-        plugin.setArtifactId( mojoBinding.getArtifactId() );
-        plugin.setVersion( mojoBinding.getVersion() );
-
-        pluginDescriptor = loadPlugin( plugin, project, session );
-
-        // fill in any blanks once we know more about this plugin.
-        if ( pluginDescriptor != null )
-        {
-            mojoBinding.setGroupId( pluginDescriptor.getGroupId() );
-            mojoBinding.setArtifactId( pluginDescriptor.getArtifactId() );
-            mojoBinding.setVersion( pluginDescriptor.getVersion() );
-        }
-
-        return pluginDescriptor;
-    }
-
-    /**
      * Load the {@link PluginDescriptor} instance for the specified plugin, using the project
for
      * the {@link ArtifactRepository} and other supplemental plugin information as necessary.
      */
@@ -120,26 +91,6 @@
     }
 
     /**
-     * Load the {@link PluginDescriptor} instance for the report plugin implied by the specified
MojoBinding,
-     * using the project for {@link ArtifactRepository} and other supplemental report/plugin
information as
-     * necessary.
-     */
-    public PluginDescriptor loadReportPlugin( MojoBinding mojoBinding, MavenProject project,
MavenSession session )
-        throws PluginLoaderException
-    {
-        ReportPlugin plugin = new ReportPlugin();
-        plugin.setGroupId( mojoBinding.getGroupId() );
-        plugin.setArtifactId( mojoBinding.getArtifactId() );
-        plugin.setVersion( mojoBinding.getVersion() );
-
-        PluginDescriptor pluginDescriptor = loadReportPlugin( plugin, project, session );
-
-        mojoBinding.setVersion( pluginDescriptor.getVersion() );
-
-        return pluginDescriptor;
-    }
-
-    /**
      * Load the {@link PluginDescriptor} instance for the specified report plugin, using
the project for
      * the {@link ArtifactRepository} and other supplemental report/plugin information as
necessary.
      */

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/PluginLoader.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/PluginLoader.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/PluginLoader.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-core/src/main/java/org/apache/maven/plugin/loader/PluginLoader.java
Thu Oct  2 04:26:35 2008
@@ -2,7 +2,6 @@
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.execution.MavenSession;
-import org.apache.maven.lifecycle.model.MojoBinding;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
@@ -26,26 +25,9 @@
         throws PluginLoaderException;
 
     /**
-     * Load the {@link PluginDescriptor} instance for the plugin implied by the specified
MojoBinding,
-     * using the project for {@link ArtifactRepository} and other supplemental plugin information
as
-     * necessary.
-     */
-    PluginDescriptor loadPlugin( MojoBinding mojoBinding, MavenProject project, MavenSession
session )
-        throws PluginLoaderException;
-
-    /**
      * Load the {@link PluginDescriptor} instance for the specified report plugin, using
the project for
      * the {@link ArtifactRepository} and other supplemental report/plugin information as
necessary.
      */
     PluginDescriptor loadReportPlugin( ReportPlugin reportPlugin, MavenProject project, MavenSession
session )
         throws PluginLoaderException;
-
-    /**
-     * Load the {@link PluginDescriptor} instance for the report plugin implied by the specified
MojoBinding,
-     * using the project for {@link ArtifactRepository} and other supplemental report/plugin
information as
-     * necessary.
-     */
-    PluginDescriptor loadReportPlugin( MojoBinding mojoBinding, MavenProject project, MavenSession
session )
-        throws PluginLoaderException;
-
 }

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
Thu Oct  2 04:26:35 2008
@@ -29,7 +29,6 @@
 import org.apache.maven.embedder.MavenEmbedderException;
 import org.apache.maven.embedder.MavenEmbedderFileLogger;
 import org.apache.maven.embedder.MavenEmbedderLogger;
-import org.apache.maven.errors.DefaultCoreErrorReporter;
 import org.apache.maven.execution.MavenExecutionRequest;
 import org.apache.maven.execution.MavenExecutionResult;
 import org.codehaus.plexus.classworlds.ClassWorld;
@@ -124,13 +123,13 @@
 
         if ( commandLine.hasOption( CLIManager.VERSION ) )
         {
-            CLIReportingUtils.showVersion();
+            //!!CLIReportingUtils.showVersion();
 
             return 0;
         }
         else if ( debug || commandLine.hasOption( CLIManager.SHOW_VERSION ) )
         {
-            CLIReportingUtils.showVersion();
+            //!!CLIReportingUtils.showVersion();
         }
 
         MavenExecutionRequest request = CLIRequestUtils.buildRequest( commandLine, debug,
quiet, showErrors );
@@ -141,14 +140,14 @@
 
         if ( cvr.isUserSettingsFilePresent() && !cvr.isUserSettingsFileParses() )
         {
-            CLIReportingUtils.showError( "Error reading user settings: ", cvr.getUserSettingsException(),
showErrors );
+            //!!CLIReportingUtils.showError( "Error reading user settings: ", cvr.getUserSettingsException(),
showErrors );
 
             return 1;
         }
 
         if ( cvr.isGlobalSettingsFilePresent() && !cvr.isGlobalSettingsFileParses()
)
         {
-            CLIReportingUtils.showError( "Error reading global settings: ", cvr.getGlobalSettingsException(),
showErrors );
+            //!!CLIReportingUtils.showError( "Error reading global settings: ", cvr.getGlobalSettingsException(),
showErrors );
 
             return 1;
         }
@@ -168,14 +167,14 @@
         }
         catch ( MavenEmbedderException e )
         {
-            CLIReportingUtils.showError( "Unable to start the embedder: ", e, showErrors
);
+            //!!CLIReportingUtils.showError( "Unable to start the embedder: ", e, showErrors
);
 
             return 1;
         }
 
         MavenExecutionResult result = mavenEmbedder.execute( request );
 
-        CLIReportingUtils.logResult( request, result, logger );
+        //!!CLIReportingUtils.logResult( request, result, logger );
 
         if ( result.hasExceptions() )
         {
@@ -201,7 +200,6 @@
         }
 
         Configuration configuration = new DefaultConfiguration()
-            .setErrorReporter( new DefaultCoreErrorReporter() )
             .setUserSettingsFile( userSettingsFile )
             .setGlobalSettingsFile( MavenEmbedder.DEFAULT_GLOBAL_SETTINGS_FILE )
             .setClassWorld( classWorld );

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/Configuration.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/Configuration.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/Configuration.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/Configuration.java
Thu Oct  2 04:26:35 2008
@@ -18,7 +18,6 @@
  * under the License.
  */
 
-import org.apache.maven.errors.CoreErrorReporter;
 import org.apache.maven.monitor.event.EventMonitor;
 import org.apache.maven.realm.MavenRealmManager;
 import org.codehaus.plexus.PlexusContainer;
@@ -138,10 +137,6 @@
     // Error Reporter
     // ----------------------------------------------------------------------------
 
-    Configuration setErrorReporter( CoreErrorReporter errorReporter );
-
-    CoreErrorReporter getErrorReporter();
-
     // ----------------------------------------------------------------------------
     // Event Monitors
     // ----------------------------------------------------------------------------

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultConfiguration.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultConfiguration.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultConfiguration.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultConfiguration.java
Thu Oct  2 04:26:35 2008
@@ -18,7 +18,6 @@
  * under the License.
  */
 
-import org.apache.maven.errors.CoreErrorReporter;
 import org.apache.maven.monitor.event.EventMonitor;
 import org.apache.maven.realm.MavenRealmManager;
 import org.codehaus.plexus.PlexusContainer;
@@ -63,8 +62,6 @@
 
     private MavenRealmManager realmManager;
 
-    private CoreErrorReporter errorReporter;
-
     /** List&lt;EventMonitor&gt;. */
     private List eventMonitors;
 
@@ -240,17 +237,6 @@
         return this;
     }
 
-    public CoreErrorReporter getErrorReporter()
-    {
-        return errorReporter;
-    }
-
-    public Configuration setErrorReporter( CoreErrorReporter errorReporter )
-    {
-        this.errorReporter = errorReporter;
-        return this;
-    }
-
     public Configuration addEventMonitor( EventMonitor eventMonitor )
     {
         if ( eventMonitors == null )

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
Thu Oct  2 04:26:35 2008
@@ -19,6 +19,15 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
 import org.apache.maven.Maven;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -31,13 +40,12 @@
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.embedder.execution.MavenExecutionRequestPopulator;
-import org.apache.maven.errors.CoreErrorReporter;
-import org.apache.maven.errors.CoreReporterManager;
-import org.apache.maven.execution.*;
-import org.apache.maven.lifecycle.LifecycleException;
-import org.apache.maven.lifecycle.LifecycleUtils;
-import org.apache.maven.lifecycle.plan.BuildPlan;
-import org.apache.maven.lifecycle.plan.BuildPlanner;
+import org.apache.maven.execution.DefaultMavenExecutionRequest;
+import org.apache.maven.execution.DefaultMavenExecutionResult;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionResult;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.execution.ReactorManager;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
@@ -53,7 +61,6 @@
 import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
 import org.apache.maven.plugin.version.PluginVersionNotFoundException;
 import org.apache.maven.plugin.version.PluginVersionResolutionException;
-import org.apache.maven.execution.DuplicateProjectException;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.MavenProjectBuildingResult;
@@ -83,21 +90,9 @@
 import org.codehaus.plexus.logging.LoggerManager;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.WriterFactory;
-import org.codehaus.plexus.util.dag.CycleDetectedException;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
 /**
  * Class intended to be used by clients who wish to embed Maven into their applications
  *
@@ -155,8 +150,6 @@
 
     private MavenExecutionRequestPopulator populator;
 
-    private BuildPlanner buildPlanner;
-
     // ----------------------------------------------------------------------
     // Configuration
     // ----------------------------------------------------------------------
@@ -343,11 +336,6 @@
     public MavenProject readProject( File mavenProject )
     throws ProjectBuildingException, MavenExecutionException
     {
-        CoreErrorReporter errorReporter = request.getErrorReporter();
-        errorReporter.clearErrors();
-
-        CoreReporterManager.setReporter( errorReporter );
-
         return readProject( mavenProject, request );
     }
 
@@ -372,11 +360,6 @@
         {
             request = populator.populateDefaults( request, configuration );
 
-            CoreErrorReporter errorReporter = request.getErrorReporter();
-            errorReporter.clearErrors();
-
-            CoreReporterManager.setReporter( errorReporter );
-
             // This is necessary to make the MavenEmbedderProjectWithExtensionReadingTest
work which uses
             // a custom type for a dependency like this:
             //
@@ -392,13 +375,6 @@
             // registered as an artifact and is not added to the classpath elements.
 
             readProject( request.getPom(), request );
-
-//            Map handlers = findArtifactTypeHandlers( project );
-
-            //TODO: ok this is crappy, now there are active collections so when new artifact
handlers
-            // enter the system they should be available.
-
-//            artifactHandlerManager.addHandlers( handlers );
         }
         catch ( MavenEmbedderException e )
         {
@@ -504,82 +480,10 @@
     // Lifecycle information
     // ----------------------------------------------------------------------
 
-    public BuildPlan getBuildPlan( List goals,
-                                   MavenProject project )
-        throws MavenEmbedderException
-    {
-        return getBuildPlan( goals, project, false );
-    }
-
-    public BuildPlan getBuildPlan( List goals,
-                                   MavenProject project,
-                                   boolean allowUnbindableMojos )
-        throws MavenEmbedderException
-    {
-        MavenExecutionRequest req = new DefaultMavenExecutionRequest( request );
-        req.setGoals( goals );
-
-        EventDispatcher dispatcher = new DefaultEventDispatcher( req.getEventMonitors() );
-
-        ReactorManager rm;
-
-        try
-        {
-            rm = new ReactorManager( Collections.singletonList( project ), ReactorManager.FAIL_FAST
);
-        }
-        catch ( CycleDetectedException e )
-        {
-            // impossible, only one project.
-            throw new MavenEmbedderException( "Cycle detected in single-project reactor manager
during build-plan lookup.", e );
-        }
-        catch ( DuplicateProjectException e )
-        {
-            // impossible, only one project.
-            throw new MavenEmbedderException( "Duplicate project detected in single-project
reactor manager during build-plan lookup.", e );
-        }
-
-        MavenSession session = new MavenSession( container, request, dispatcher, rm );
-
-        try
-        {
-            return buildPlanner.constructBuildPlan( goals, project, session, allowUnbindableMojos
);
-        }
-        catch ( LifecycleException e )
-        {
-            throw new MavenEmbedderException( "Failed to construct build-plan for project:
"
-                                              + project.getId() + " using goals: '"
-                                              + StringUtils.join( goals.iterator(), ", "
) + "'", e );
-        }
-    }
-
+    //!!
     public List getLifecyclePhases()
     {
-        return getBuildLifecyclePhases();
-    }
-
-    public List getAllLifecyclePhases()
-    {
-        return LifecycleUtils.getValidPhaseNames();
-    }
-
-    public List getDefaultLifecyclePhases()
-    {
-        return getBuildLifecyclePhases();
-    }
-
-    public List getBuildLifecyclePhases()
-    {
-        return LifecycleUtils.getValidBuildPhaseNames();
-    }
-
-    public List getCleanLifecyclePhases()
-    {
-        return LifecycleUtils.getValidCleanPhaseNames();
-    }
-
-    public List getSiteLifecyclePhases()
-    {
-        return LifecycleUtils.getValidSitePhaseNames();
+        return null;
     }
 
     // ----------------------------------------------------------------------
@@ -680,8 +584,6 @@
             populator = (MavenExecutionRequestPopulator) container.lookup(
                 MavenExecutionRequestPopulator.ROLE );
 
-            buildPlanner = (BuildPlanner) container.lookup( BuildPlanner.class );
-
             artifactHandlerManager = (ArtifactHandlerManager) container.lookup( ArtifactHandlerManager.ROLE
);
 
             // This is temporary as we can probably cache a single request and use it for
default values and
@@ -866,11 +768,6 @@
                 return result;
             }
 
-            CoreErrorReporter errorReporter = request.getErrorReporter();
-            errorReporter.clearErrors();
-
-            CoreReporterManager.setReporter( errorReporter );
-
             return maven.execute( request );
         }
         finally

Modified: maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
(original)
+++ maven/components/branches/maven-3.0.x-lifecycle/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
Thu Oct  2 04:26:35 2008
@@ -28,7 +28,6 @@
 import org.apache.maven.embedder.Configuration;
 import org.apache.maven.embedder.MavenEmbedder;
 import org.apache.maven.embedder.MavenEmbedderException;
-import org.apache.maven.errors.DefaultCoreErrorReporter;
 import org.apache.maven.execution.MavenExecutionRequest;
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.Repository;
@@ -101,8 +100,6 @@
     {
         eventing( request, configuration );
 
-        reporter( request, configuration );
-
         executionProperties( request, configuration );
 
         pom( request, configuration );
@@ -129,22 +126,6 @@
         return request;
     }
 
-    private void reporter( MavenExecutionRequest request,
-                           Configuration configuration )
-    {
-        if ( request.getErrorReporter() == null )
-        {
-            if ( configuration.getErrorReporter() != null )
-            {
-                request.setErrorReporter( configuration.getErrorReporter() );
-            }
-            else
-            {
-                request.setErrorReporter( new DefaultCoreErrorReporter() );
-            }
-        }
-    }
-
     private void executionProperties( MavenExecutionRequest request,
                                       Configuration configuration )
     {

Modified: maven/components/branches/maven-3.0.x-lifecycle/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-3.0.x-lifecycle/pom.xml?rev=701085&r1=701084&r2=701085&view=diff
==============================================================================
--- maven/components/branches/maven-3.0.x-lifecycle/pom.xml (original)
+++ maven/components/branches/maven-3.0.x-lifecycle/pom.xml Thu Oct  2 04:26:35 2008
@@ -262,7 +262,9 @@
   <modules>
     <module>maven-core</module>
     <module>maven-distribution</module>
+    <!-- 
     <module>maven-lifecycle</module>
+    -->
     <module>maven-model</module>
     <module>maven-plugin-api</module>
     <module>maven-project</module>



Mime
View raw message