Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-beta-9
-
None
-
None
-
Patch
Description
The PrepareReleaseMojo.execute() method contains the following statement:
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() ); }
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:
throw (MojoFailureException)new MojoFailureException( e.getMessage() ).initCause(e);