Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of mvnd on Jenkins for parallel builds #704

Open
OLibutzki opened this issue Oct 7, 2022 · 7 comments
Open

Usage of mvnd on Jenkins for parallel builds #704

OLibutzki opened this issue Oct 7, 2022 · 7 comments

Comments

@OLibutzki
Copy link

OLibutzki commented Oct 7, 2022

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 OLibutzki changed the title Usage of mvnd in Jenkins for parallel builds Usage of mvnd on Jenkins for parallel builds Oct 7, 2022
@OLibutzki
Copy link
Author

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

@ppalaga
Copy link
Contributor

ppalaga commented Oct 26, 2022

@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

@OLibutzki
Copy link
Author

OLibutzki commented Oct 26, 2022

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?

@ardalangh
Copy link

@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?

@gnodet
Copy link
Contributor

gnodet commented May 22, 2023

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

@lppedd
Copy link

lppedd commented May 31, 2023

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

@ppalaga
Copy link
Contributor

ppalaga commented May 31, 2023

Does the improved log output depend on the smart builder?

No, it is done inside mvnd client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants