Skip to content

[maven-4.0.x] LifecycleStarter implementations silently swallow RuntimeException #12593

Description

@elharo

LifecycleStarter implementations silently swallow RuntimeException

Found in: maven-4.0.x branch
Files:

  • impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleStarter.java (line 88)
  • impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/ConcurrentLifecycleStarter.java (line 67)
    Severity: High

Description

Both lifecycle starter implementations catch all exceptions, including RuntimeException and Error, and silently add them to the result without rethrowing:

} catch (Exception e) {
    result.addException(e);  // RuntimeException NOT rethrown
}

This means NullPointerException, ArrayIndexOutOfBoundsException, and other programming errors are silently recorded but the build continues as if nothing happened (or terminates normally with errors in the result). The caller has no way to distinguish between a recoverable build error and a JVM-level programming error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions