Thanks to the relase of the maven tidy plugin, it is now easy to assure your pom has all elements in a standard order:
mvn tidy:pom |
Commit. Done.
Thanks to the relase of the maven tidy plugin, it is now easy to assure your pom has all elements in a standard order:
mvn tidy:pom |
Commit. Done.
Maven builds often take some time. This often causes me to start doing something else (read mail, browse web), which makes me unaware of when the build completes and I can continue working.
There should be a way to fix this. On Ubuntu, you get notifications when mail arrives, when network is up/down etc. Why not use this same system to get notifications when the maven build completes.
You can do this by adding the following in your ~/.bash_aliases file:
alias maven="command mvn" notified_maven() { maven $* ; notify-send --icon=message-im "mvn" "build finished" } alias mvn=notified_maven |
Update
Thanks to Adrien, you can also use a more advanced version, showing the build result and maven parameters.
alias maven="command mvn" notified_maven() { maven $* | \ perl -pe'$m|=/BUILD .*SUCCESS/; END {exit!$m}' && \ notify-send --icon=face-cool "`basename $(pwd)`: mvn $*" "Build SUCCESS" || \ notify-send --icon=face-crying "`basename $(pwd)`: mvn $*" "Build FAILED" } alias mvn=notified_maven |
Thanks to @bertvanhooff, I found a link to a script to get colorized maven output in bash, see https://github.com/builddoctor/maven-antsy-color. Very nice.
I did have quite a bit of trouble to get this working in Ubuntu using gnome-terminal.
Note however that this can play havoc with some plug-ins. Specifically, the maven release plug-in will hang when releasing from a git repository when maven output is colourized. Starting a new console using bash -login can do the trick.