Thanks for inspiration, Victor!
For the record, I was mentioning
a part of "Configure Jenkins" page, which turns out to probably be a part of maven-plugin. Currently it's located right above the master node config (# of executors, etc.)
The YAML config for CasC should look similar to this:
# "Maven Project Configuration" section
mavenmoduleset:
globalMavenOpts: "some opts"
localRepository:
perJob: # alternatives: default, perExecutor
Now I haven't yet successfully managet to get the plugin to work, but it is possible to do the same as Groovy init:
import hudson.maven.MavenModuleSet;
import hudson.maven.local_repo.*;
/*
* Possible classes of the hudson.maven.local_repo package:
* - DefaultLocalRepositoryLocator
* - PerExecutorLocalRepositoryLocator
* - PerJobLocalRepositoryLocator
*/
def mvnModuleSetDesc = MavenModuleSet.DESCRIPTOR;
mvnModuleSetDesc.setGlobalMavenOpts("Some options")
mvnModuleSetDesc.setLocalRepository(new PerJobLocalRepositoryLocator())