To remove all disabled modules in Maven jobs
Jenkins.instance.getAllItems(hudson.maven.MavenModuleSet.class).findAll{job -> job.isBuildable()}.each{ job -> job.getDisabledModules(true).each{module -> module.delete()} println(job.name+" cleaned") }
To remove all disabled modules in Maven jobs
Jenkins.instance.getAllItems(hudson.maven.MavenModuleSet.class).findAll{job -> job.isBuildable()}.each{ job -> job.getDisabledModules(true).each{module -> module.delete()} println(job.name+" cleaned") }