[
http://jira.codehaus.org/browse/MRELEASE-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=208152#action_208152
]
Kohsuke Kawaguchi commented on MRELEASE-515:
--------------------------------------------
Brett, the code that's displaying the error message needs to make that
distinction (or else you'll still see the stack trace for
MojoFailureException), and that's already being done.
So there really isn't any reason not to properly chain the exception. This is
to correctly report the stack trace with the -e option.
> release:prepare eats the root cause of the exception
> ----------------------------------------------------
>
> Key: MRELEASE-515
> URL: http://jira.codehaus.org/browse/MRELEASE-515
> Project: Maven 2.x Release Plugin
> Issue Type: Bug
> Affects Versions: 2.0-beta-9
> Reporter: Kohsuke Kawaguchi
> Assignee: Olivier Lamy
> Fix For: 2.0
>
>
> The PrepareReleaseMojo.execute() method contains the following statement:
> {code:java}
> try
> {
> releaseManager.prepare( config, getReleaseEnvironment(), reactorProjects,
> resume, dryRun );
> }
> catch ( ReleaseExecutionException e )
> {
> throw new MojoExecutionException( e.getMessage(), e );
> }
> catch ( ReleaseFailureException e )
> {
> throw new MojoFailureException( e.getMessage() );
> }
> {code}
> As you can see, the stack trace and nested exception of the
> ReleaseFailureException is lost, which makes it unnecessarily hard to
> diagnose the root cause of problems like MRELEASE-332. The code should be
> modified to something like:
> {code}
> throw (MojoFailureException)new MojoFailureException( e.getMessage()
> ).initCause(e);
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira