maven-mvnd icon indicating copy to clipboard operation
maven-mvnd copied to clipboard

Usage of mvnd on Jenkins for parallel builds

Open OLibutzki opened this issue 3 years ago • 7 comments
trafficstars

Hi everyone,

we would like to build the modules our multi-module maven projects on Jenkins concurrently.

Using mvn -T that works quite well, but unfortunately the logs are messed up as all the different hreads write to the console output.

mvnd offers a great way to visualize the progress of a parallel multi.-module build and - even mor eimportant - collects the log output and prints it after the build is finished. We would like to benefit from this feature in Jenkins as well.

So, I don't need the daemon itself in Jenkins, but this output optimiazion. If there is a way to port it to maven itself my problem would be solved too. For the time being I assume it's more realistic to use mvnd instead of mvn in Jenkins.

Maybe you have another idea how to solve my issue?

OLibutzki avatar Oct 07 '22 08:10 OLibutzki

I decided to create a maven issue as porting the great mvnd console output to maven might be a better solution: https://issues.apache.org/jira/browse/MNG-7581

OLibutzki avatar Oct 26 '22 05:10 OLibutzki

@OLibutzki note that the smart builder used in mvnd is a bit different from the multithreaded builder available in stock Maven. Thus when the console output is ported, you may still see some difference in performance between mvn and mvnd. See https://peter.palaga.org/2021/01/11/mvnd-parallel-builds.html#smart_builder_by_default

ppalaga avatar Oct 26 '22 12:10 ppalaga

I have not been aware of the smart builder, to be honest.

With this request I don't focus on the performance improvements of mvnd...

The way mvnd visualizes the process of the build plus the per-module-aggregation of the log is the feature I would love to see in maven... and I would like to benefit from it in Jenkins.

Does the improved log output depend on the smart builder?

OLibutzki avatar Oct 26 '22 14:10 OLibutzki

@ppalaga @OLibutzki Hi, apologies for the unrelated question. Can maven-mvnd be utilized for a Jenkins build where all maven builds are executed in containers that are killed upon build completion?

ardalangh avatar May 22 '23 19:05 ardalangh

Note that the mvnd.noDaemon option may help here, see #43

gnodet avatar May 22 '23 19:05 gnodet

Wondering how logging is displayed in a Jenkins build console tho. Isn't it a bit messed up given how the output works?

lppedd avatar May 31 '23 09:05 lppedd

Does the improved log output depend on the smart builder?

No, it is done inside mvnd client.

ppalaga avatar May 31 '23 13:05 ppalaga