You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thorsten Glaser (JIRA)" <ji...@apache.org> on 2017/06/21 17:59:00 UTC

[jira] [Commented] (MNG-6241) colour output cannot be disabled from settings.xml or MAVEN_OPTS

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

Thorsten Glaser commented on MNG-6241:
--------------------------------------

To add insult to injury, the 「MessageUtils.setColorEnabled(false);」 call is only in the CLI, meaning everything that calls Maven via something else (like Jenkins) must change their own code as well (like maven35-interceptor/src/main/java/org/apache/maven/cli/DefaultMavenExecutionRequestBuilder.java in Jenkins).

Centralised parsing of a settings.xml entry and an environment variable (or even a JVM -Doption) would certainly help here.

> colour output cannot be disabled from settings.xml or MAVEN_OPTS
> ----------------------------------------------------------------
>
>                 Key: MNG-6241
>                 URL: https://issues.apache.org/jira/browse/MNG-6241
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>            Reporter: Thorsten Glaser
>
> Coloured output does not look very nice in a Jenkins logfile *and* breaks some plugins we use, therefore I wish to disable it programmatically.
> However, looking at the source, I find it can only be disabled by passing the command-line options -B or -l, but not from settings.xml or via MAVEN_OPTS in the environment.
> I’ve worked around this by using dpkg-divert to move the mvn binary away and placing this…
> {{{
> # cat /usr/share/maven/bin/mvn
> #!/bin/mksh-static
> exec /usr/share/maven/bin/mvn.dpkg-dist -B "$@"
> }}}
> … in its stead, but that’s creepy at best. Please implement a setting, ideally for settings.xml *and* MAVEN_OPTS, to disable colour.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)