o Suppressed stack trace for unrecognized CLI options

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@948688 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-05-27 06:43:04 +00:00
parent 770b6d905f
commit 81b3f432b0
1 changed files with 7 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import java.util.StringTokenizer;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.UnrecognizedOptionException;
import org.apache.maven.Maven;
import org.apache.maven.exception.DefaultExceptionHandler;
import org.apache.maven.exception.ExceptionHandler;
@ -163,7 +164,12 @@ public class MavenCli
{
return e.exitCode;
}
catch( Exception e )
catch ( UnrecognizedOptionException e )
{
// pure user error, suppress stack trace
return 1;
}
catch ( Exception e )
{
CLIReportingUtils.showError( logger, "Error executing Maven.", e, cliRequest.showErrors );