Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven toolchains.xml location under Jenkins

I'm finding it difficult to use Maven toolchains together with Jenkins. I need to specify that tests should be run with a 32-bit JVM, and doing this in by placing a suitable JDK definition in $HOME/.m2/toolchains.xml works when I am running locally on my machine, but how do I get this to work in a Jenkins environment where there are multiple slaves which need different toolchain definitions? I don't want to have to place toolchains.xml files in the $HOME directory on each Jenkins slave. I could place toolchains.xml in the root directory of my project, but then how do I specify which JVM each slave should use?

like image 392
JesperE Avatar asked Nov 03 '22 18:11

JesperE


1 Answers

You are SOoL.

It is one of my personal per peeves that Toolchains support is lacking a CLI or property override within Maven.

It makes integration testing of Toolchains support within Maven Plugins a right royal pain.

One of these days I will see if I can get it wired up, though you will most likely have to live with the support being only available in Maven 3.0.5 or later

like image 99
Stephen Connolly Avatar answered Nov 09 '22 12:11

Stephen Connolly