mirror of https://github.com/apache/maven.git
Slight addition to MNG-5389 so that the afterSessionEnd method throws a MavenExecutionException like the other methods in the participant
This commit is contained in:
parent
8f3eca3d0f
commit
b05dd063f9
|
@ -66,6 +66,7 @@ public abstract class AbstractMavenLifecycleParticipant
|
|||
* code.
|
||||
*/
|
||||
public void afterSessionEnd( MavenSession session )
|
||||
throws MavenExecutionException
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
|
|
@ -317,7 +317,14 @@ public class DefaultMaven
|
|||
|
||||
if ( result.hasExceptions() )
|
||||
{
|
||||
afterSessionEnd( projects, session );
|
||||
try
|
||||
{
|
||||
afterSessionEnd( projects, session );
|
||||
}
|
||||
catch (MavenExecutionException e)
|
||||
{
|
||||
return addExceptionToResult( result, e );
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -339,12 +346,20 @@ public class DefaultMaven
|
|||
return addExceptionToResult( result, session.getResult().getExceptions().get( 0 ) );
|
||||
}
|
||||
|
||||
afterSessionEnd( projects, session );
|
||||
try
|
||||
{
|
||||
afterSessionEnd( projects, session );
|
||||
}
|
||||
catch (MavenExecutionException e)
|
||||
{
|
||||
return addExceptionToResult( result, e );
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void afterSessionEnd( Collection<MavenProject> projects, MavenSession session )
|
||||
private void afterSessionEnd( Collection<MavenProject> projects, MavenSession session )
|
||||
throws MavenExecutionException
|
||||
{
|
||||
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue