Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44543

Don't force --batch-mode to benefit of Maven 3.5 colorized output

      I'd like to enable the color console of maven 3.5.0 on Jenkins (using AnsiColorPlugin).

      Currently the pipeline-maven-plugin will force the --batch-mode parameter. As per the documentation: The Maven parameters that are useful on a build server, "--batch-mode" ("-B") and "--show-version" ("-V") are enable by default, no need to add them in your mvn invocations.

      This is what maven says about --batch-mode: Run in non-interactive (batch) mode (disables output color)

      I understand this is a sensible default behavior to set --batch-mode on Jenkins, however I would appreciate it if there was a way I could override these defaults.

      Thanks

       

       

          [JENKINS-44543] Don't force --batch-mode to benefit of Maven 3.5 colorized output

          Daniel Beland created issue -
          Daniel Beland made changes -
          Description Original: I'd like to enable the color console of maven 3.5.0 on Jenkins (using AnsiColorPlugin).

          Currently the pipeline-maven-plugin will force the --batch-mode parameter. As per the documentation: The Maven parameters that are useful on a build server, "{{--batch-mode}}" ("{{-B}}") and "{{--show-version}}" ("{{-V}}") are enable by default, no need to add them in your mvn invocations.

          This is what maven says about --batch-mode: Run in non-interactive (batch) mode (disables output color)

          I understand this is a sensible default behavior to set --batch-mode on Jenkins, however I would appreciate it if there was a way I could override these defaults.

          Thanks

           

           
          New: I'd like to enable the color console of maven 3.5.0 on Jenkins (using AnsiColorPlugin).

          Currently the pipeline-maven-plugin will force the \-\-batch-mode parameter. As per the documentation: The Maven parameters that are useful on a build server, "{{\-\-batch-mode}}" ("{{\-B}}") and "{{--show-version}}" ("{{-V}}") are enable by default, no need to add them in your mvn invocations.

          This is what maven says about --batch-mode: Run in non-interactive (batch) mode (disables output color)

          I understand this is a sensible default behavior to set --batch-mode on Jenkins, however I would appreciate it if there was a way I could override these defaults.

          Thanks

           

           

          Daniel Beland added a comment -

          By the way to enable colors through jenkins you also need to specify -Djansi.force=true in mavenOpts

          Daniel Beland added a comment - By the way to enable colors through jenkins you also need to specify -Djansi.force=true in mavenOpts

          Daniel Beland added a comment -

          There seems to be a discussion already to enable colors even in batch mode: https://issues.apache.org/jira/browse/MNG-6220

          I'm ok to wait and see what happens with it before we alter the pipeline-maven-plugin

          Daniel Beland added a comment - There seems to be a discussion already to enable colors even in batch mode: https://issues.apache.org/jira/browse/MNG-6220 I'm ok to wait and see what happens with it before we alter the pipeline-maven-plugin
          Cyrille Le Clerc made changes -
          Assignee Original: Alvaro Lobato [ alobato ] New: Cyrille Le Clerc [ cleclerc ]
          Cyrille Le Clerc made changes -
          Remote Link New: This issue links to "MNG-6220 Add CLI options to control color output (Web Link)" [ 16929 ]

          Thanks dcendents for your research, I would prefer to get MNG-6220 implemented and keep the batch-mode

          Cyrille Le Clerc added a comment - Thanks dcendents for your research, I would prefer to get MNG-6220 implemented and keep the batch-mode
          Cyrille Le Clerc made changes -
          Summary Original: Don't force --batch-mode New: Don't force --batch-mode to benefit of Maven 3.5 colorized output

          Jesse Glick added a comment -

          --batch-mode should stay. The new option is -Dstyle.color=always.

          Jesse Glick added a comment - --batch-mode should stay. The new option is -Dstyle.color=always .

          Daniel Beland added a comment -

          I think we all agreed batch mode should be kept and we can use the new color style property of maven once they add it. So this issue can be closed.

           

          BTW, color style was meant to be in maven 3.5.2 but it is broken: https://issues.apache.org/jira/browse/MNG-6296)

           

          Daniel Beland added a comment - I think we all agreed batch mode should be kept and we can use the new color style property of maven once they add it. So this issue can be closed.   BTW, color style was meant to be in maven 3.5.2 but it is broken: https://issues.apache.org/jira/browse/MNG-6296)  
          Daniel Beland made changes -
          Resolution New: Won't Do [ 10001 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            cleclerc Cyrille Le Clerc
            dcendents Daniel Beland
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: