maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r759545 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
Date Sat, 28 Mar 2009 18:30:22 GMT
Author: jvanzyl
Date: Sat Mar 28 18:30:22 2009
New Revision: 759545

URL: http://svn.apache.org/viewvc?rev=759545&view=rev
Log:
o take the reactor manager out of more signatures, it's contained in the session so we don't
need to pass around both

Modified:
    maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java

Modified: maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=759545&r1=759544&r2=759545&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
(original)
+++ maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
Sat Mar 28 18:30:22 2009
@@ -124,7 +124,7 @@
                     for ( String goal : goals )
                     {
                         String target = currentProject.getId() + " ( " + goal + " )";
-                        executeGoalAndHandleFailures( goal, session, currentProject, session.getReactorManager(),
buildStartTime, target );
+                        executeGoalAndHandleFailures( goal, session, currentProject, buildStartTime,
target );
                     }
                 }
                 finally
@@ -137,7 +137,7 @@
         }
     }
 
-    private void executeGoalAndHandleFailures( String task, MavenSession session, MavenProject
project, ReactorManager rm, long buildStartTime, String target )
+    private void executeGoalAndHandleFailures( String task, MavenSession session, MavenProject
project, long buildStartTime, String target )
         throws BuildFailureException, LifecycleExecutionException
     {
         try
@@ -146,22 +146,25 @@
         }
         catch ( LifecycleExecutionException e )
         {
-            if ( handleExecutionFailure( rm, project, e, task, buildStartTime ) )
+            if ( handleExecutionFailure( session, project, e, task, buildStartTime ) )
             {
                 throw e;
             }
         }
         catch ( BuildFailureException e )
         {
-            if ( handleExecutionFailure( rm, project, e, task, buildStartTime ) )
+            if ( handleExecutionFailure( session, project, e, task, buildStartTime ) )
             {
                 throw e;
             }
         }
     }
 
-    private boolean handleExecutionFailure( ReactorManager rm, MavenProject project, Exception
e, String task, long buildStartTime )
+    private boolean handleExecutionFailure( MavenSession session, MavenProject project, Exception
e, String task, long buildStartTime )
     {
+        //TODO: we shouldn't be registering build failures with the reactor manager, it should
be in the session.
+        ReactorManager rm = session.getReactorManager();
+        
         rm.registerBuildFailure( project, e, task, System.currentTimeMillis() - buildStartTime
);
 
         if ( ReactorManager.FAIL_FAST.equals( rm.getFailureBehavior() ) )



Mime
View raw message