I'm looking to configure Jenkins JDK installations programmatically, either through the CLI or by writing XML files.
I know I can amend the config.xml file (main one) to include JDK installations but I'd prefer to have it configured in a separate file. (e.g hudson.tasks.Ant.xml)
How to achieve this?
I've managed to do it :) Just call this:
jenkins.model.Jenkins.getInstance().getJDKs().add(new hudson.model.JDK("id", "path"))