Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
mvn
 
 

Output Highlighting for Maven

I miss Ant's AnsiColorLogger. So I found a blog post and another blog post, spent some time messing around, and decided to share the results on GitHub. It works by wrapping your wrapping your Maven command and then inserting ANSI colour codes in the output.

To Colorize Maven Output

  • put the file in a handy directory (like ~/scripts)
  • add a link to it in your .bashrc (or other shell's initialization file)
  • example below:
mkdir -p ${HOME}/scripts # make a place for the script to live  
cp mvn ${HOME}/scripts echo "[[ -s \"${HOME}/scripts/mvn\" ]] && source \"${HOME}/scripts/mvn\"" >> ${HOME}/.bashrc # add to RC file
. ${HOME}/bashrc # to re-read your bash configuration
  • alternatively, in recent Ubuntu Linux and OSX the default ~/.bashrc looks for alias additions in a separate file, that you can simply append to:
curl -L https://raw.github.com/builddoctor/maven-antsy-color/master/mvn >> ~/.bash_aliases

How do you spell 'colour'?

With a u in it. Until you realise that you're outnumbered by people who use the Georgian-era spelling

About

Maven ANSI colour wrapper to give you shiny, readable output from Maven

Resources

Releases

No releases published

Packages

No packages published

Languages