diff --git a/maven-plugins/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanPlugin.java b/maven-plugins/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanPlugin.java index 4bb2f599d6..7b50a3b8d0 100644 --- a/maven-plugins/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanPlugin.java +++ b/maven-plugins/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanPlugin.java @@ -22,10 +22,10 @@ import java.io.File; /** - * @author Emmanuel Venisse - * @version $Id$ * @goal clean * @description Goal which cleans the build + * @author Emmanuel Venisse + * @version $Id$ */ public class CleanPlugin extends AbstractMojo @@ -91,6 +91,7 @@ private boolean delete( File f ) * @param d the directory to delete */ protected void removeDir( File d ) + throws MojoExecutionException { String[] list = d.list(); if ( list == null ) @@ -113,11 +114,11 @@ protected void removeDir( File d ) // TODO:... // if ( failOnError ) // { -// throw new Exception( message ); + throw new MojoExecutionException( message ); // } // else // { - getLog().info( message ); +// getLog().info( message ); // } } } @@ -129,13 +130,12 @@ protected void removeDir( File d ) // TODO:... // if ( failOnError ) // { -// throw new Exception( message ); + throw new MojoExecutionException( message ); // } // else // { - getLog().info( message ); +// getLog().info( message ); // } } } - }