You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Kanters (JIRA)" <ji...@apache.org> on 2019/06/14 07:07:00 UTC

[jira] [Commented] (MNG-6065) Creating opton --fail-level / -fl which is error by default, but could be changed to warning/warn.

    [ https://issues.apache.org/jira/browse/MNG-6065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16863759#comment-16863759 ] 

Martin Kanters commented on MNG-6065:
-------------------------------------

[~rfscholte] For my understanding, we create a new flag called "--fail-level" or shorthand "-fl" which can have the values WARN/WARNING and ERROR? You mentioned that it should be ERROR by default, but do you mean that if you would provide --fail-level without any value, that it would be ERROR? `mvn compile --fail-level` seems a bit weird to me. 

Or did you mean that a build should fail when getting ERROR loglines irregardless of having this --fail-level flag set at all?

Currently a mvn build fails when an exception is thrown, not specifically when an error is logged, right?

> Creating opton --fail-level / -fl which is error by default, but could be changed to warning/warn. 
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MNG-6065
>                 URL: https://issues.apache.org/jira/browse/MNG-6065
>             Project: Maven
>          Issue Type: Improvement
>    Affects Versions: 3.5.0
>            Reporter: Robert Scholte
>            Priority: Major
>              Labels: infosupport
>             Fix For: needing-scrub-3.4.0-fallout
>
>
> I've been thinking the option {{--fail-level}} / {{-fl}} which is {{error}} by default, but could be changed to {{warning}}/{{warn}}. We've had similar request and they make sense: one should be able to execute a build without any warnings.
>  I did an attempt to hook into the Logger to but that seems very tricky. The other option is to have this level available in the API, so Maven core and plugins can verify it for themselves and decide to throw an Exception. It is a simple implementation, but now every component is responsible for checking it, not really my preferred solution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)