SAP/cloud-mta-build-tool

New Maven Builder (mvn clean package) causes huge logs by missing batch mode

MatthiasSchmalz opened this issue · 1 comments

With Version 1.1.0 the command to run a Maven build has been switch from
mvn -B package
to
mvn clean package

Adding clean makes sense, however the removal of the -B (Batch mode) has bad effects on the log output in Pipelines because it spams the log with download progress numbers. This causes our logs to grow so big that the browser can't handle them anymore and crashes.
The old build command is still available as deprecated, but in my opinion the standard recommended command requires -B. We do not want to stick on a deprecated build command just to have clean logs.

E.g. logs look like this
Downloaded from artifactory: https://int.repositories.cloud.sap/artifactory/build-snapshots/org/codehaus/mojo/mojo-parent/40/mojo-parent-40.pom (34 kB at 4.8 MB/s)
[2023-06-20T01:03:40.723Z] info mtaBuild - Downloading from artifactory: https://int.repositories.cloud.sap/artifactory/build-snapshots/org/codehaus/mojo/findbugs-maven-plugin/3.0.5/findbugs-maven-plugin-3.0.5.jar
[2023-06-20T01:03:40.723Z] info mtaBuild - Progress (1): 4.1/145 kB
Progress (1): 7.3/145 kB
Progress (1): 11/145 kB
Progress (1): 16/145 kB
Progress (1): 20/145 kB
Progress (1): 24/145 kB
Progress (1): 28/145 kB
Progress (1): 32/145 kB
Progress (1): 36/145 kB
Progress (1): 40/145 kB
Progress (1): 44/145 kB
Progress (1): 48/145 kB
Progress (1): 52/145 kB
Progress (1): 56/145 kB
Progress (1): 61/145 kB
Progress (1): 65/145 kB
Progress (1): 69/145 kB
Progress (1): 73/145 kB
Progress (1): 77/145 kB
Progress (1): 81/145 kB
Progress (1): 85/145 kB
Progress (1): 89/145 kB
Progress (1): 93/145 kB
Progress (1): 97/145 kB
Progress (1): 102/145 kB
Progress (1): 106/145 kB
Progress (1): 110/145 kB
Progress (1): 114/145 kB
Progress (1): 118/145 kB
Progress (1): 122/145 kB
Progress (1): 126/145 kB
Progress (1): 130/145 kB
Progress (1): 134/145 kB
Progress (1): 138/145 kB
Progress (1): 142/145 kB
Progress (1): 145 kB

Please provide the following info:

  • MBT Version: 1.2.16
  • dockerImage:devxci/mbtci-java8-node16:1.2.16

from MBT v1.2.25, the default maven builder command is upgrade to "mvn -B clean package", the "-B" batch mode is added back.