Maurycyt
Maurycyt

Reputation: 718

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?

Upvotes: 1

Views: 1236

Answers (1)

Maurycyt
Maurycyt

Reputation: 718

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

Upvotes: 1

Related Questions