Maven toolchains.xml location under Jenkins

3.8k views Asked by At

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?

1

There are 1 answers

4
Stephen Connolly On

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