maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject git commit: [MNG-5208] Parallel (-T option) multi module build fires wrong project failed event
Date Sun, 02 Dec 2012 10:05:58 GMT
Updated Branches:
  refs/heads/master 327e1b7e8 -> 75ea1e429


[MNG-5208] Parallel (-T option) multi module build fires wrong project failed event

Patch by Stefan Eder , applied with minor modifications


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/75ea1e42
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/75ea1e42
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/75ea1e42

Branch: refs/heads/master
Commit: 75ea1e42975b780cf57962b4d377c60ccdd634ea
Parents: 327e1b7
Author: Kristian Rosenvold <kristian.rosenvold@gmail.com>
Authored: Sat Dec 1 21:30:57 2012 +0100
Committer: Kristian Rosenvold <kristian.rosenvold@gmail.com>
Committed: Sun Dec 2 11:05:37 2012 +0100

----------------------------------------------------------------------
 .../maven/lifecycle/internal/BuilderCommon.java    |   11 +++++------
 .../lifecycle/internal/LifecycleModuleBuilder.java |    4 ++--
 .../lifecycle/internal/LifecycleWeaveBuilder.java  |    4 ++--
 3 files changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/75ea1e42/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
index 2e63647..a018737 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuilderCommon.java
@@ -48,7 +48,7 @@ import java.util.Set;
 
 /**
  * Common code that is shared by the LifecycleModuleBuilder and the LifeCycleWeaveBuilder
- * 
+ *
  * @since 3.0
  * @author Kristian Rosenvold
  *         Builds one or more lifecycles for a full module
@@ -133,9 +133,8 @@ public class BuilderCommon
         return executionPlan;
     }
 
-    public void handleBuildError( final ReactorContext buildContext, final MavenSession rootSession,
-                                  final MavenProject mavenProject, Exception e, final long
buildStartTime )
-    {
+    public void handleBuildError(final ReactorContext buildContext, final MavenSession rootSession,
final MavenSession currentSession,
+                                  final MavenProject mavenProject, Exception e, final long
buildStartTime) {
         if ( e instanceof RuntimeException )
         {
             e = new InternalErrorException( "Internal error: " + e, e );
@@ -147,7 +146,7 @@ public class BuilderCommon
 
         buildContext.getResult().addBuildSummary( new BuildFailure( mavenProject, buildEndTime
- buildStartTime, e ) );
 
-        eventCatapult.fire( ExecutionEvent.Type.ProjectFailed, rootSession, null, e );
+        eventCatapult.fire( ExecutionEvent.Type.ProjectFailed, currentSession, null, e );
 
         if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( rootSession.getReactorFailureBehavior()
) )
         {
@@ -187,4 +186,4 @@ public class BuilderCommon
     }
 
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/maven/blob/75ea1e42/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
index fe69c0a..a0056b4 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilder.java
@@ -32,7 +32,7 @@ import java.util.HashSet;
 
 /**
  * Builds one or more lifecycles for a full module
- * 
+ *
  * @since 3.0
  * @author Benjamin Bentmann
  * @author Jason van Zyl
@@ -92,7 +92,7 @@ public class LifecycleModuleBuilder
         }
         catch ( Exception e )
         {
-            builderCommon.handleBuildError( reactorContext, rootSession, currentProject,
e, buildStartTime );
+            builderCommon.handleBuildError(reactorContext, rootSession, session, currentProject,
e, buildStartTime);
         }
         finally
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/75ea1e42/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
index 12058e5..4b26728 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleWeaveBuilder.java
@@ -277,8 +277,8 @@ public class LifecycleWeaveBuilder
                 }
                 catch ( Exception e )
                 {
-                    builderCommon.handleBuildError( reactorContext, rootSession, projectBuild.getProject(),
e,
-                                                    buildStartTime );
+                    builderCommon.handleBuildError( reactorContext, rootSession, projectBuild.getSession(),
+                                                    projectBuild.getProject(), e, buildStartTime
);
                 }
                 finally
                 {


Mime
View raw message