Skip to content

Instantly share code, notes, and snippets.

@michaelavila
Created January 19, 2016 22:23
Show Gist options
  • Save michaelavila/55bcbd86cd96c23f6b5f to your computer and use it in GitHub Desktop.
Save michaelavila/55bcbd86cd96c23f6b5f to your computer and use it in GitHub Desktop.
Colorize maven output
  1. brew install grc
  2. add alias mvn='grc -c conf.mvn mvn' to your ~/.profile
  3. copy the other file in this gist to ~/.grc/conf.mvn
# a grc module for colourising the maven outputs
regexp=^\[WARNING\]
colours=bold yellow
count=once
-
regexp=^\[ERROR\]
colours=bold red
count=once
-
# Passed
regexp=.* SUCCESS \[.*
colours=green
count=stop
-
regexp=.* BUILD SUCCESS
colours=green
count=stop
-
# Failed
regexp=(BUILD)? (failed|FAILURE|FAILED|FAIL)
colours=bold red
count=stop
-
regexp=Failures: [0-9]+
colours=bold green
count=once
-
regexp=Errors: [0-9]+
colours=bold red
count=once
-
# this is probably a pathname
regexp=~?([a-z_][a-z0-9_]{0,30})?/([^\0\n\ !$`&*()+]|\\\ )+\b/?
colours=blue
count=more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment