[TIP] Mvnd module rolling window size
Mvnd is a new awesome tool for Maven based project. It is a daemon - like Gradle or native-image have - which caches some Maven metadata to make the execution faster. It also parallelizes by default the build and output in parallel each module logs which is pretty nice. In practise you can save a lot of time on a day of work using it and it is just about using mvnd instead of mvn in your commands.
However, the defaults don't always match your needs. On real project, you often want to know what is happening right now and the issue with the default output is that you don't see the build logs enough to know where your project is in "current" mojo. In other words, you know you are in "tests" but you don't know where you are. If you test suite is fast it is ok but if you have integration tests or a broken test - which hangs - it is helping to know it is FooBarTest which blocks.
To solve it you can ask mvnd to print a few lines per module of the outputs - this sounds natural but it is really nice to have logs per module and each module in its "window". Concretely here is what it can look like:
As you can see, the modules meecrowave-junit, meecrowave-maven-plugin, meecrowave-arquillian, ... are built in parallel and we have a block per module showing its log output.
This "block" is called rolling window and its size (height/number of lines) is configurable.
As any configuration of mvnd - you can get the list with mvnd --help command, it goes into ~/.m2/mvnd.properties. Previous snapshot uses a height of 4 (lines). To configure it this way you just have to add in the mvnd.properties file this line:
mvnd.rollingWindowSize=4
Then rerun mvnd - you can use mvnd --stop to kill manually the daemon - and you will get the previous output instead of a very small rolling window not enabling you to know what is happening.
Last tip is that you can set it to a higher value but don't be too greedy because then, when building in parallel a lot of module (#cpu_core - 1) you wouldn't see all the module logs in your window which is the goal at the end.
From the same author:
In the same category: