How to set a JVM option in Jenkins globally for every job?

rlegendi picture rlegendi · Oct 17, 2012 · Viewed 49k times · Source

I've recently installed a new JDK (1.7u9), and I got some very strange VerifyErrors. In a thread I found that it could help me if I use a -XX:-UseSplitVerifier magic switch for the compilation.

What I would like to do is to set this Java option globally in Jenkins, but haven't found any configurations for it. Can someone help me out how can I do this?

The closest thing I was able to come up with is to set the argument through Maven, but I have to do it for each project configuration - and I'd like to avoid that.

Thanks in advance.

Answer

Anders R. Bystrup picture Anders R. Bystrup · Oct 17, 2012

Under the main menu item Manage Jenkins->Configure System you can set it in the box for Global MAVEN_OPTS.

It is a bit unclear whether you want the option turned on for the Jenkins container itself or only the jobs running in it, but if the latter and you're only running maven jobs, that's what I would do.

Cheers,