Skip to content

ofavre/mvn-colorfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mvn-colorfilter

A gawk colorizing filter for use with mvn.

How does it work?

It is a mere gawk script, that understands the general structure of mvn ’s output and recognizes several elements, colorizes each part with escape codes, and outputs the result in the console.

Along with a shell script aimed at being used as an alias instead of mvn.

Installation

To install the files, use the following command:

sudo make install

This will install into /usr/local/bin/, but you can change it by adding PREFIX=/usr/bin as an argument.
The Bash completion hook will get installed into /etc/bash_completion.d/, you can change it by adding COMPLETION_FOLDER=/your/path as an argument.

You can optionally make an alias to use mvn-color instead of raw mvn. To do so append the following line in your ~/.bashrc:

alias mvn="mvn-color"
alias mvn-nocolor="$(which mvn)"

Usage

Use mvn-color as a drop-in replacement for mvn, see the alias presented in the installation section.

mvn-color {arguments}

Or use with manually appending the color filter after each mvn invocation:

mvn {arguments} | mvn-colorfilter

The shell script is aimed at solving some problems that can arise when you press Ctrl+C with a forked java task.
Please try and report any such problems, and tell me if they are solved with the mvn-color script.

Uninstallation

Simply type:

sudo make uninstall

Don’t forget to use the same PREFIX and COMPLETION_FOLDER as at installation (normally not mentioned).

This won’t remove the alias you may have installed yourself. Do it by hand.

About

Colorizing filter for maven2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published