SAP / cloud-mta-build-tool

Multi-Target Application (MTA) build tool for Cloud Applications https://sap.github.io/cloud-mta-build-tool
Apache License 2.0
139 stars 61 forks source link

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

Closed MatthiasSchmalz closed 1 year ago

MatthiasSchmalz commented 1 year ago

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:

young-yang03 commented 1 year ago

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

https://github.com/SAP/cloud-mta-build-tool/blob/7a1724fe744b8c9ef84de807607662a14416eb92/configs/builder_type_cfg.yaml#L49