apache / apache/maven

[MNG-7146] Introduce MojoExceptionHandler

Open
#7,963 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** opened **[MNG-7146](https://issues.apache.org/jira/browse/MNG-7146?redirect=false)** and commented

A long time ago discussed with [aheritier](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=aheritier), but never created a ticket for it.
Reason behind this is that Jenkins wants to build the complete project and uses a hack to ignore test failures. by rewriting the surefire configuration.
It would be better if Jenkins could catch the Exception and decide what to do with it.
Important, the build must fail, even if all these Exceptions are ignored.

```java
public void handle(MojoException ex) throws MojoException
{
throw ex;
}
```

```java
public void handle(MojoException ex) throws MojoException
{
// ignore or throw
}
```

---
No further details from [MNG-7146](https://issues.apache.org/jira/browse/MNG-7146?redirect=false)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.