You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alexander Kriegisch (Jira)" <ji...@apache.org> on 2024/02/03 09:33:00 UTC

[jira] [Created] (MCOMPILER-574) ‎AbstractCompilerMojo::execute should propagate exception cause

Alexander Kriegisch created MCOMPILER-574:
---------------------------------------------

             Summary: ‎AbstractCompilerMojo::execute should propagate exception cause
                 Key: MCOMPILER-574
                 URL: https://issues.apache.org/jira/browse/MCOMPILER-574
             Project: Maven Compiler Plugin
          Issue Type: Improvement
    Affects Versions: 3.12.1
            Reporter: Alexander Kriegisch


[In {{‎AbstractCompilerMojo::execute}}|https://github.com/apache/maven-compiler-plugin/blob/c08b0fda5445a2a3f495a3d6524d80c82fc9d5e6/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java#L680-L684], errors caught from the compiler manager are swallowed, instead a new {{MojoExecutionException}} is thrown. This renders debugging root causes for problems with compiler DI scanning, injection and instantiation virtually impossible.

The caught exception should be passed on as a cause for the new exception.

[~laeubi], see our discussion [here|https://github.com/codehaus-plexus/plexus-compiler/pull/361#discussion_r1477027270].



--
This message was sent by Atlassian Jira
(v8.20.10#820010)