mirror of https://github.com/apache/maven.git
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:
parent
770b6d905f
commit
81b3f432b0
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue