Dan
Dan

Reputation: 9801

How can I use ANSI color output in the IntellIJ console (2019.3)?

I'm using a very nice Java text coloring library jansi which works perfectly when I run the my code from a DOS prompt or a LINUX terminal.

Unfortunately most of the time I find myself running code from my IntellIJ IDE (2019.3) and the console doesn't respect the ANSI coloring. Is there anyway round this? I did come across this question which discusses using the grep console plugin for this purpose, but this no longer works.

Is there any plugin or configuration settings that will allow me to use ANSI coloring and commands in the IntellIJ console?

Upvotes: 3

Views: 6821

Answers (1)

Zon
Zon

Reputation: 19918

From Intellij terminal you can simply run mvn install -Dstyle.color=always -Djansi.force=true

If you run Intellij's maven using command in Maven-panel, or execute it in your Run -> Edit Configurations

enter image description here

Then configure Intellij Maven settings like this:

https://i.imgur.com/WTiHJF4.png enter image description here

Upvotes: 1

Related Questions