maven-mvnd
maven-mvnd copied to clipboard
mvnd in rtMaven
Hi,
I was wondering if we can use mvnd as a tool in rtMaven (https://www.jfrog.com/confluence/display/RTF5X/Working+With+Pipeline+Jobs+in+Jenkins)
We use rtMaven as part of jenkins pipeline file written in groovy and it only uses maven and runs mvn I was wondering if we can somehow use mvnd instead of mvn.
For us the rtMaven.tool equals to maven-3.3.9 and the way it runs maven is as follows -
rtMaven.run pom: 'pom.xml', goals: "clean install -Dmaven.test.skip=${params.skipJUnitTests}".toString()
Not sure if it is possible or if we can get this working, any help will be appreciated.
I want to fully utilize mvnd to improve the build process time.
I do not think we can help with rtMaven specific questions. You may consider contacting rtMaven developers.
Generally, for using mvnd on the CI:
- If you expect faster builds thanks to building Maven modules in parallel, then you may consider using stock Maven's
-Toption. But be warned that it may lead to issues caused by the fact that stock Maven (as of 3.8.2) does not prevent concurrent writes to the same file in the local Maven repo. BTW mvnd 0.6.0 suffers from this problem as well. You may or may not be affected by this depending on whether your source tree contains modules that (1) can be built in parallel and (2) have common dependencies. - Build time gains resulting from re-using a warmed up JVM and plugin class loaders can only be leveraged if you'd use one daemon instance across multiple CI builds. I have no idea whether this can be done with Jenkins and I am not 100% sure this kind of builds would fulfill the criterion of reproducibility. mvnd is still quite new and it still has bugs in its class loader caching implementation. This is fine when using it locally, because you can easily kill it via
mvnd --stopwhen something goes apparently wrong. But doing this on the CI? I do not know.
Thanks @ppalaga I agree perhaps its too early to use it in CI, I noticed the amount of time it saved for me on my local and thought this can help us in reducing build time on jenkins. We have a multinode jenkins cluster and I was thinking may be we can install mvnd on all nodes and take advantage of its features. Thanks for your response.