'Running maven in non-interactive (batch) mode with colours
Running maven in non-interactive mode (e.g. for CI/CD) disables all colouring, but it would be easier to analyse the logs if they were coloured. Is it possible to run maven in non-interactive mode while keeping the colours?
Solution 1:[1]
Yes. You can specify the usage of colours with the style.color system property defined as "always".
In the case of maven install, simply run
mvn install --batch-mode -Dstyle.color=always
or, shorter
mvn install -B -Dstyle.color=always
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Maurycyt |
