[ https://issues.apache.org/jira/browse/MNG-7338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17728727#comment-17728727 ]
ASF GitHub Bot commented on MNG-7338: ------------------------------------- gnodet commented on code in PR #869: URL: https://github.com/apache/maven/pull/869#discussion_r1214326567 ########## maven-embedder/src/main/java/org/apache/maven/cli/CLIManager.java: ########## @@ -173,7 +177,17 @@ public CLIManager() { .build()); options.addOption(Option.builder(Character.toString(BATCH_MODE)) .longOpt("batch-mode") - .desc("Run in non-interactive (batch) mode (disables output color)") + .desc( + "Run in non-interactive (batch) mode (disables output color) - alias for --non-interactive (kept for backwards compatability)") + .build()); + options.addOption(Option.builder(NON_INTERACTIVE) + .longOpt("non-interactive") + .desc("Run in non-interactive (batch) mode (disables output color) - alias for --batch-mode") + .build()); + options.addOption(Option.builder(FORCE_INTERACTIVE) + .longOpt("force-interactive") + .desc( + "Run in interactive mode - even when the environment variable CI is set to true and --non-interactive or --batch-mode are set") Review Comment: I'm not sure the flag is relevant for jansi. > Reduce carbon footprint in CI > ----------------------------- > > Key: MNG-7338 > URL: https://issues.apache.org/jira/browse/MNG-7338 > Project: Maven > Issue Type: Bug > Reporter: Jörg Hohwiller > Assignee: Martin Kanters > Priority: Major > > MNG-4198 was closed with a simple workaround to add {{-B}} option. > However, if you look at the real world you will notice that in travis, > circle-ci, jenkins, github-actions, etc. 99% of the builds do not use it (not > even by defaults from the makers of build templates) and hence 80% of the log > files are pure spam and waste: > {code} > Progress (2): 0.9/2.6 MB | 160/502 kB > Progress (2): 0.9/2.6 MB | 164/502 kB > Progress (2): 0.9/2.6 MB | 168/502 kB > Progress (2): 0.9/2.6 MB | 172/502 kB > Progress (2): 0.9/2.6 MB | 176/502 kB > Progress (2): 0.9/2.6 MB | 180/502 kB > Progress (2): 0.9/2.6 MB | 180/502 kB > Progress (2): 1.0/2.6 MB | 180/502 kB > Progress (2): 1.0/2.6 MB | 184/502 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 4.1/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 8.2/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 12/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 16/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 20/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 25/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 29/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 33/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 37/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 41/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 45/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 49/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 53/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 57/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 61/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 66/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 70/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 74/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 78/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 82/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 86/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 90/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 94/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 98/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 102/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 106/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 111/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 184/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 188/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 193/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 197/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 201/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 205/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 209/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 213/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 217/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 221/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 225/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 229/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 233/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 238/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 242/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 246/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 250/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 254/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 258/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 262/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 266/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 270/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 274/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 279/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 283/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 287/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 291/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 295/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 299/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 303/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 307/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 311/502 kB | 115/196 kB > Progress (3): 1.0/2.6 MB | 311/502 kB | 115/196 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 4.1/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 8.2/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 12/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 16/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 20/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 25/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 29/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 33/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 37/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 41/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 45/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 49/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 53/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 57/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 61/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 66/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 70/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 74/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 78/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 82/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 86/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 90/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 94/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 98/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 102/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 106/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 111/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 115/220 kB > Progress (4): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 4.1/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 8.2/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 12/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 16/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 20/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 25/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 29/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 33/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 37/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 41/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 45/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 49/53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 115/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 119/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 123/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 127/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 311/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 315/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 319/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 324/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 328/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 332/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 336/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 340/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 344/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 348/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 352/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 356/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 360/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 119/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 123/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 127/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 131/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 135/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 139/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 143/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 147/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 152/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 156/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 160/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 164/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 168/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 172/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 176/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 180/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 184/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 188/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 193/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 197/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 201/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 205/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 209/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 213/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 217/220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 131/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 135/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 135/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 139/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 143/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 147/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 152/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 156/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 160/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 164/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 168/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 172/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 176/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 180/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 184/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 188/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 193/196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 365/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 369/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 373/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 377/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 381/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 385/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 389/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 393/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 397/502 kB | 196 kB | 220 kB | 53 kB > Progress (5): 1.0/2.6 MB | 401/502 kB | 196 kB | 220 kB | 53 kB > {code} > To do something good for the environment it would be awesome to change this. > There are the following options: > 1. convince every individual project to change their build scripts and add > {{-B}} > 2. convince every CI provider to add {{-B}} to {{MAVEN_OPTS}} > 3. build some magic into maven that will notice if it is running inside CI or > generally headless and then enable batch mode automatically. > My few cents on these approaches: > 1. never gonna work. New projects show up faster than you can fix existing > ones. > 2. possible but tricky > 3. maybe somewhat ugly from the maven PoV but the most effective one (at > least after a longer time when all CI vendors have updated to such maven > version). > Input for 3.: > * Travis: {{CI=true}} - see > https://docs.travis-ci.com/user/environment-variables/ > * CircleCI: {{CI=true}} - see > https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables > * GHA: {{CI=true}} - see > https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables > * Jenkins: {{CI=true}} - see https://issues.jenkins.io/browse/JENKINS-36707 > So actually 3. would not be hard to do but could save a lot of waste (many > many terra-bytes word-wirde again causing lots of bandwith and lots of time > for humans to read logs and find the interesting spots again consuming more > energy). > Could you please think about it? -- This message was sent by Atlassian Jira (v8.20.10#820010)