diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java index 6838a5cd84..68e5e90b9a 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java @@ -201,7 +201,8 @@ public MavenExecutionResponse execute( MavenSession session, ReactorManager rm, private void executeTaskSegments( List taskSegments, ReactorManager rm, MavenSession session, MavenProject rootProject, EventDispatcher dispatcher, MavenExecutionResponse response ) - throws ArtifactNotFoundException, MojoExecutionException, LifecycleExecutionException, MojoFailureException + throws ArtifactNotFoundException, MojoExecutionException, LifecycleExecutionException, MojoFailureException, + ArtifactResolutionException { for ( Iterator it = taskSegments.iterator(); it.hasNext(); ) { @@ -368,7 +369,7 @@ private void executeTaskSegments( List taskSegments, ReactorManager rm, MavenSes } private void handleExecutionFailure( ReactorManager rm, MavenProject project, Exception e, String task ) - throws MojoExecutionException, MojoFailureException, ArtifactNotFoundException + throws MojoExecutionException, MojoFailureException, ArtifactNotFoundException, ArtifactResolutionException { if ( ReactorManager.FAIL_FAST.equals( rm.getFailureBehavior() ) ) { @@ -386,6 +387,10 @@ else if ( e instanceof ArtifactNotFoundException ) { throw (ArtifactNotFoundException) e; } + else if ( e instanceof ArtifactResolutionException ) + { + throw (ArtifactResolutionException) e; + } else { getLogger().error( "Attempt to register inappropriate build-failure Exception.", e );