You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kohsuke Kawaguchi (JIRA)" <ji...@codehaus.org> on 2010/01/20 01:54:55 UTC
[jira] Commented: (MRELEASE-515) release:prepare eats the root
cause of the exception
[ http://jira.codehaus.org/browse/MRELEASE-515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=207543#action_207543 ]
Kohsuke Kawaguchi commented on MRELEASE-515:
--------------------------------------------
Also see MNG-3279, which adds the right constructor to MojoFailureException, although I don't know if maven-release-plugin can depend on 2.0.9 or not.
> 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
>
> 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