Search code examples
javamavenconfigurationjenkinsjvm-arguments

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


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.


Solution

  • 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,