maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r589822 - in /maven/components/trunk: maven-core/src/main/java/org/apache/maven/ maven-core/src/main/java/org/apache/maven/execution/ maven-embedder/src/main/java/org/apache/maven/embedder/
Date Mon, 29 Oct 2007 19:42:34 GMT
Author: jdcasey
Date: Mon Oct 29 12:42:33 2007
New Revision: 589822

URL: http://svn.apache.org/viewvc?rev=589822&view=rev
Log:
Fix Maven/DefaultMaven method signatures, push projectSessions map into request.

Modified:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/Maven.java
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
    maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java?rev=589822&r1=589821&r2=589822&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java Mon
Oct 29 12:42:33 2007
@@ -102,13 +102,12 @@
     // lifecycle execution
 
     public ReactorManager createReactorManager( MavenExecutionRequest request,
-                                                MavenExecutionResult result,
-                                                Map projectSessions )
+                                                MavenExecutionResult result )
     {
         List projects;
         try
         {
-            projects = getProjects( request, projectSessions );
+            projects = getProjects( request );
 
             if ( projects.isEmpty() )
             {
@@ -159,7 +158,7 @@
         return reactorManager;
     }
 
-    public MavenExecutionResult execute( MavenExecutionRequest request, Map projectSessions
)
+    public MavenExecutionResult execute( MavenExecutionRequest request )
     {
         request.setStartTime( new Date() );
 
@@ -167,8 +166,7 @@
 
         ReactorManager reactorManager = createReactorManager(
             request,
-            result,
-            projectSessions );
+            result );
 
         if ( result.hasExceptions() )
         {
@@ -187,7 +185,7 @@
             request,
             reactorManager,
             dispatcher,
-            projectSessions );
+            request.getProjectSessions() );
 
         for ( Iterator i = request.getGoals().iterator(); i.hasNext(); )
         {
@@ -262,7 +260,7 @@
         systemContext.store( buildContextManager );
     }
 
-    private List getProjects( MavenExecutionRequest request, Map projectSessions )
+    private List getProjects( MavenExecutionRequest request )
         throws MavenExecutionException
     {
         List projects;
@@ -283,7 +281,7 @@
         // instances just-in-time.
         try
         {
-            buildExtensionScanner.scanForBuildExtensions( files, request.getLocalRepository(),
request.getProfileManager(), projectSessions );
+            buildExtensionScanner.scanForBuildExtensions( files, request.getLocalRepository(),
request.getProfileManager(), request.getProjectSessions() );
         }
         catch ( ExtensionScanningException e )
         {

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/Maven.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/Maven.java?rev=589822&r1=589821&r2=589822&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/Maven.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/Maven.java Mon Oct 29
12:42:33 2007
@@ -23,8 +23,6 @@
 import org.apache.maven.execution.MavenExecutionResult;
 import org.apache.maven.execution.ReactorManager;
 
-import java.util.Map;
-
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
  * @version $Id$
@@ -53,7 +51,7 @@
 
     static final int LOGGING_LEVEL_DISABLE = 5;
 
-    MavenExecutionResult execute( MavenExecutionRequest request, Map projectSessions );
+    MavenExecutionResult execute( MavenExecutionRequest request );
 
-    ReactorManager createReactorManager( MavenExecutionRequest request, MavenExecutionResult
result, Map projectSessions );
+    ReactorManager createReactorManager( MavenExecutionRequest request, MavenExecutionResult
result );
 }

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java?rev=589822&r1=589821&r2=589822&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
(original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
Mon Oct 29 12:42:33 2007
@@ -28,7 +28,9 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -60,6 +62,13 @@
 
     private boolean isProjectPresent = true;
 
+    /**
+     * These are {@link MavenProjectSession} instances, keyed by
+     * groupId:artifactId:version of the project, and used to lookup and store
+     * extension and plugin realms specific to that project.
+     */
+    private Map projectSessions;
+
     // ----------------------------------------------------------------------------
     // We need to allow per execution user and global settings as the embedder
     // might be running in a mode where its executing many threads with totally
@@ -602,5 +611,21 @@
     public List getRemoteRepositories()
     {
         return remoteRepositories;
+    }
+
+    public Map getProjectSessions()
+    {
+        if ( projectSessions == null )
+        {
+            projectSessions = new HashMap();
+        }
+
+        return projectSessions;
+    }
+
+    public MavenExecutionRequest setProjectSessions( Map projectSessions )
+    {
+        this.projectSessions = projectSessions;
+        return this;
     }
 }

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java?rev=589822&r1=589821&r2=589822&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
(original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
Mon Oct 29 12:42:33 2007
@@ -30,6 +30,7 @@
 import java.io.File;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -194,7 +195,7 @@
     boolean isProjectPresent();
     MavenExecutionRequest setProjectPresent( boolean isProjectPresent );
 
-    File getUserSettingsFile();    
+    File getUserSettingsFile();
     MavenExecutionRequest setUserSettingsFile( File userSettingsFile );
 
     File getGlobalSettingsFile();
@@ -202,4 +203,7 @@
 
     MavenExecutionRequest addRemoteRepository( ArtifactRepository repository );
     List getRemoteRepositories();
+
+    MavenExecutionRequest setProjectSessions( Map projectSessions );
+    Map getProjectSessions();
 }

Modified: maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java?rev=589822&r1=589821&r2=589822&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
(original)
+++ maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
Mon Oct 29 12:42:33 2007
@@ -490,7 +490,7 @@
             return result.addExtensionScanningException( e );
         }
 
-        ReactorManager reactorManager = maven.createReactorManager( request, result, projectSessions
);
+        ReactorManager reactorManager = maven.createReactorManager( request, result );
 
         if ( result.hasExceptions() )
         {
@@ -901,7 +901,7 @@
                 return result;
             }
 
-            return maven.execute( request, projectSessions );
+            return maven.execute( request );
         }
         finally
         {



Mime
View raw message