[ https://issues.apache.org/jira/browse/MNG-6220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16244089#comment-16244089 ]
Daniel Beland commented on MNG-6220: ------------------------------------ I'm sorry to say but it is not working and the test is wrong. The test goes (MavenCliTest.java): {code:java} MessageUtils.setColorEnabled( true ); request = new CliRequest( new String[] { "-Dstyle.color=never" }, null ); cli.cli( request ); cli.properties( request ); cli.logging( request ); assertFalse( MessageUtils.isColorEnabled() ); {code} While the real code goes (MavenCli.java): {code:java} try { initialize( cliRequest ); cli( cliRequest ); logging( cliRequest ); version( cliRequest ); properties( cliRequest ); localContainer = container( cliRequest ); commands( cliRequest ); configure( cliRequest ); toolchains( cliRequest ); populateRequest( cliRequest ); encryption( cliRequest ); repository( cliRequest ); return execute( cliRequest ); } {code} cli.logging is called before cli.properties while the test was calling them in a different order. When I debug maven the userProperties is always empty and then default value of auto is assumed for the color logging. > Add CLI options to control color output > --------------------------------------- > > Key: MNG-6220 > URL: https://issues.apache.org/jira/browse/MNG-6220 > Project: Maven > Issue Type: New Feature > Reporter: Manuel Ryan > Assignee: Robert Scholte > Fix For: 3.5.2 > > > Currently, the only way to enable/disable color output is to use the > batch-mode or log-file options. > If a user wants colored output but no interactivity (ie: jenkins environment > with the ansicolor plugin), there is no CLI option combination to support the > use-case. > I propose to add an option to control output coloring directly. > {noformat} > --color=enabled <- color output always enabled > --color=disabled <- color output always disabled > --color=auto <- current behavior (default) > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)